Project Name: PRCP-1004-Fifa20
Y Vagesh(vagesh129@gmail.com),
The data is about related to the online video game FIFA. The data originates from the Canadian video game company Electronic Arts (EA) publishes a series of football simulation video game annually under the banner of EA Sports FIFA. These video games simulate the real-world playing styles and techniques used in football, and provide players with a sense of pride and accomplishment in terms of managing a team of virtual football plyers.
The series began using the official FIFA license in 1993 and has since produced yearly instalments, the latest being EA Sports FIFA 20. Each annual release occurs around the end of August or September, with a playable demo released two-three weeks earlier. The numbering scheme followed by the franchise relates to the shortening of the upcoming football season of that particular year; for example, the FIFA 20 game includes the players and clubs participating in the 2019-20 football season in the real life.
This is usually determined by two ratings given to the players-player overall and player potential. Player overall gives the rating of the player in the current scenario in real life, whereas player potential tries to determine the potential to which the player can reach over time.
ID of the player in fifa 20
url to fifa 20 player profile
short Name or the name used by a perticular player in game
full name of th player
Age of the player
the date of the birth of given player
height of the player in centimeters
weight of the player in kilograms
nationality of the player
The club player plays for
overall attribute of a player
potential attribute of a player
value in EUR of the player
wage in EUR of the player
positions of the player
preferred foot of the player
international reputation attribute
weak foot of the player
quality moves attribute
productivity attribute
type of body
Only Generic Faces that updated to Real Faces,what the person seems to be.
Some players will have a release clause. This is like a trump card that lets you bypass the selling team and go straight to contract negotiations with the player, as long as you're willing to pay it. If the release clause is close to his value, it can be a great way to cut out a stubborn selling team.
A label attached to players for the purpose of identification or to give other information.Showing great potential.
This involves drafting a team position-by-position from many of the best. arrangement of a team on its field of play during a game.
The number is more reflective of a player's role on the team. It is a tradition from early "association football".
Loan players are limited use items that can boost the overall performance of your team. In this Loan Players Guide for FIFA 20 Ultimate Team.team has the player been loaned
Join to bring in contact, connect, or bring or put together that the player joined to team or club.
Have a valid ... Agreement” Register their valid EA Account for eligibility and accept the Official Rules
A position where the team stands in the world.
Number assigned to the team of particular country
Pace (PAC) is a Player Attribute in FIFA that determines a player's speed in walking and running.
To take a shot hitting to ball in an attempt to score a goal.
Passing is the primary method of distributing the ball in a game of FIFA. It might appear to be easy on the surface, but a massive skill gap exists between players who know how to press the pass button and players who have gained mastery of FIFA 20’s passing mechanics.
Dribbling is crucial when playing a match in FIFA 20. Without carrying the ball and passing your opponent, you won't be able to score in FIFA 20. The better you are at dribbling, the easier you can control the game. The Active Touch system in FIFA 20 will help you to control the ball a way better.
Being able to switch to your preferred player while defending will allow you to cover open spaces and make interceptions more efficiently. Imagine a scenario where an opponent's player is running down the left flank, you could manually switch to your left-back to track your opponent's run and win the ball back.
Physical (PHY), also knows as Physicality, is a Player Attribute in FIFA that represents the physical and body status of a player.
The goalkeeper has relatively simple controls in the penalty kick shootout. To block penalties you can move the goalkeeper from side to side with the left stick. You can then use the right stick to dive in any direction. Goalkeepers can also do gestures with the face buttons on the controller.
Placing the ball down, take one large stride 'straight' back. Mark that point either mentally or with a stud mark, then take a few smaller paces back. Don't go off the pitch. Then take one large sidestep to the left or right, depending which foot you kick with
Reflex saves are attributed to a keeper's alertness. Take penalties saves as an example. Prior to making their dive, goalkeepers stand upright, arms out, on their toes, and poised to make a quick move. ... The keeper has to react very quickly to get the ball to safety
Speed makes only a small difference for pulling the keeper for 1v1 and if your moving them it will make a small difference to but not noticeable since you only move them a few steps. The 2nd most important this is their distribution if your playing to win.
Shows Position of Goalkeepers The goalkeeper's main job is to stop the other team from scoring by catching, palming or punching the ball from shots, headers and crosses. Unlike their teammates, goalkeepers typically remain in and around their own penalty area for most of the game.
Traits are used to provide players with unique skills and play styles in the game that match their real-life counterparts. Each Trait impacts some aspect of the player’s behaviour on the pitch or, in some cases, off of it.
This attribute measures how accurately the player crosses the ball during both normal running and free kick set pieces.
Finishing is the accuracy of shots using foot, inside the penalty area. a great finisher would have this force push it towards the goal, or when it would’ve normally gone wide the ball would at least hit the post.
This stats measures the heading accuracy of the player for either a pass or a shot. In fact, this stats does two things: affects your player’s ability to get their head on the ball, then how accurate that header is going to be. It applies to headed passes as well as headers at goal.
A pass of the ball between teammates too close together to allow an opponent to get between them. A short side foot pass enables a team to quickly pass a ball and help maintain possession. The side foot pass provides accuracy. This attribute ranks how well a player performs a short / ground pass to his teammate. In other words, it determines a player’s accuracy and speed of passing over a short distance.
A volley is usually a shot hit first time without the ball touching the ground. This attribute measures the accuracy and power of volleys at goal. It affects the technique and accuracy of shots taken while the ball is in the air. This tends to be coupled with the balance trait if he is not fully facing the goal. Volleys stat is responsible for some of the most beautiful goals.
Dribbling is the player’s ability to carry the ball and past an opponent. A higher value means the player will be able to keep better possession of the ball whilst dribbling because he will keep the ball closer, making it harder for the opponent to win it off of him.
Player Attribute in FIFA that determines a player's ability to curve the ball when passing and shooting. The higher the value the more curve/curl the player is capable of putting on the ballIt’s a good attribute to have for any set piece takers; curling corners can be a nightmare to defend against, and curling free-kicks can be tough to save.
Free Kick is a FIFA attribute used to measures the player’s accuracy for taking Free Kicks. The higher the value the better the accuracy of a direct free kick on goal. More player scores during a free kick, the higher will be his points or percentage in terms of free kick accuracy. Ideally, you should pick a free-kick taker who has a good score for free kick accuracy and curve
This stat is used to classify how well a player performs a long pass in the air to his teammate. It doesn’t affect long ground passes. This also determines how quickly the ball gets to him – the higher the score, the faster and more accurate the pass will be.
Getting and keeping the ball under control is an important skill a football player has to learn and in response to this, an essential skill.
Sprint speed measures how fast the player runs while at top speed.
A game of football consists of a series of sprints strategically performed over 90 minutes. These sprints involve lots of short, rapid bursts of acceleration.
Agility measures how agile the player is while moving or turning. In other words, how fast and graceful a player is able to control the ball. Players with high agility can perform acrobatic shots or clearances, and agility also affects dribbling ability. If you’re a player who likes to run with the ball, agility is one of the stats to keep an eye on.
Is a Player Attribute in FIFA that determines the acting speed of a player in response to the situations happening around them. Reactions measures how quickly a player responds to a situation happening around him.
Balance attribute is the ability to maintain balance after a physical challenge. This is another attribute that influences a player’s dribbling skill and, more generally, how responsive the player you’re controlling feels. If you have high stats for agility and balance then you’ll move fluidly and you’ll be able to get in or out of tight spots. Also, even if you have 95+ for acceleration and sprint speed, your player could feel sluggish and a little unresponsive if they lack agility and balance
Shot Power evaluates how hard the player hits the ball when taking a shot at goal. It is the amount of power a player can put into a shot while still keeping it accurate. It affects how fast the ball travels when struck from any distance. A player with a low shot power can still hit the ball hard into the back of the net but the longer you hold B/O the more likely he is to miss.
Jumping is the player’s ability and quality for jumping from the surface for header.The higher the value is, the higher the player can jump.
Stamina determines the rate at which a player will tire during a game. It evaluates how tired your player gets as the match approaches half time or full time.
Strength is about the quality or state of being physically strong. The higher the value, the more likely the player will win a physical challenge.
This attribute measures the accuracy of shots from outside the penalty area. This is a great attribute for midfielders to have.
The aggression level of a player measures the frequency and the aggression of jostling, tackling and slide tackling. It is the attribute which determines the player’s power of will or commitment to a match.
Interceptions is a Player Attribute in FIFA that determines a player's capability to intercept the ball - to catch the opposing team's passes.
Positioning (POS) is a Player Attribute in FIFA that determines that how well a player is able to perform the positioning on the field as a player or on the goal line as a goalkeeper.
Vision ranks the player's awareness of the position of his teammates & opponents around him. It is the attribute that increases (or reduces) the possibilities of a successful long pass. When we're playing looking at the screen we usually have an above view of the game, just like when we're watching football on TV.
The ideal penalty will fill two or two-and-a-half bars, which gives it more than enough power to ensure the goalkeeper cannot reach it. Timed finishing has also been integrated into FIFA 21's penalties, meaning that you can improve the accuracy of your spot kicks by pressing the shoot button at the moment of impact.
COMPOSURE This attribute determines at what distance the playerwith the ball starts feeling the pressure from the opponent. This then affects the chances of theplayer making an error when he shoots, passes and crosses. The higher the value, the better the player performs when under pressure from an opponent.
Marking is the ability to track and defend an opposing player. In otherwords, it is your player's ability to stay close to an opposing attacker and stop him getting to a cross/pass from a teammate. Also contributes to tracking runs.
The best way to defend is to jockey (L2/LT) to move into positionand then use standing tackle (Circle/X) to win the ball. A badly-timed standing tackle can leave you exposed, so only use it when close to the attacker.
In FIFA 20, you can power up your standing and sliding tackles by holding the tackle button for longer. This allows you to lunge further with your tackles, but if you power up too much, you will either miss the ball or cause a foul. Two bars should be the maximum power for any tackle.
The goalkeeper has relatively simple controls in the penalty kick shootout. To block penalties you can move the goalkeeper from side to side with the left stick. You can then use the right stick to dive in any direction. Goalkeepers can also do gestures with the face buttons on the controller
Handling is an exclusive goalkeeper attribute used to measures how cleanly he catches the ball and does he hold on to it. In other words, it is the frequency that the keeper catches the ball rather than parrying it and whether or not he holds onto it.
To perform a drop kick, press the button responsible for the shooting, and select the direction and strength of the play.
Goalkeeper (GK) The Goalkeeper (or GK for short) is the mostspecialized position in football. A goalkeeper's job is mainly defensive: to guard the team's goal from being breached (to not let the other team score). Goalkeeper is the only position defined in the Laws of the Game.
Professional goalkeepers regularly work on their reflexes in training. Reflex training drills are designed to simulate match situations where keepers are required to act fast — such as shots from point blank range, second rebounds, or attempts made through a crowd of players.
In soccer, the abbreviation “LS” means Left Striker. The left striker(LS) is positioned on the left-hand side of the forward players near the opposition’s goal. The role of the left striker(LS) is to score goals for the team when given the opportunity and to create opportunities from the left-hand side of the soccer field.
In soccer, the abbreviation “ST” means Striker. The striker(ST) on a soccer team is the player positioned nearest to the opposition’s goal. The role of the striker(ST) is to score goals for the team and be the focal point for any passes made when the team is in attack.
In soccer, the abbreviation “RS” means Right Striker. The right striker(RS) is positioned on the right-hand side of the forward players near the opposition’s goal. The role of the right striker(RS) is to score goals for the team when given the opportunity and to create opportunities from the right-hand side of the soccer field.
In soccer, the abbreviation “LW” means Left Winger. The left-winger(LW) is positioned on the left-wing of the team, meaning the left-hand side. The role of the left-winger(LW) is to cover the entire left side of the soccer field supporting both the offense and defense.
In soccer, the abbreviation “LF” means Left Forward. The left forward(LF) is positioned on the left-hand side of the team’s attacking line. The role of the left forward(LF) is to contribute to the goals scored by their team as well as creating goal-scoring opportunities for other players on the team.
In soccer, the abbreviation “CF” means Center Forward. The Center Forward(CF) is the player positioned furthest forward on a team and operates closer to the opposition’s goal than any other player on the team. The role of the Center Forward(CF) is to score goals for the team.
In soccer, the abbreviation “RF” means Right Forward. The right forward(RF) is positioned furthest forward in a soccer team on the right-hand side of the soccer field. The role of the right forward is to work with the other offensive players on the team to create goal-scoring opportunities and score goals for their team.
In soccer, the abbreviation “RW” means Right Winger. The right-winger(RW) is positioned on the right-wing of the team, meaning the right-hand side. The role of the right-winger(RW) is to cover the entire right side of the soccer field supporting both the offense and defense.
In soccer, the abbreviation “LAM” means Left Attacking Midfielder. The left Attacking midfielder(LAM) is positioned on the left-hand side of the soccer field and has the responsibility of supporting both the defense and forward players any time the soccer ball is on the left side of the field. The left Attacking midfielder(LAM) is often one of the fastest players on a team and is skilled at crossing the ball.
In soccer, the abbreviation “CAM” means Central Attacking Midfielder. The Central Attacking Midfielder, or CAM, on a team, is positioned in the center of the soccer field just behind the forwards. Their role is to assist and support the forwards on their team in an attack on the opposition goal.
In soccer, the abbreviation “RAM” means Right Attacking Midfielder. The right Attacking midfielder(RM) is positioned on the right-hand side of the midfield. The role of the right attacking midfielder(RAM) is to link the team’s defense and attacking players on the right-hand side of the field and support both the offense and defense.
In soccer, the abbreviation “LM” means Left Midfielder. The left midfielder(LM) is positioned on the left-hand side of the soccer field and has the responsibility of supporting both the defense and forward players any time the soccer ball is on the left side of the field. The left midfielder(LM) is often one of the fastest players on a team and is skilled at crossing the ball.
Who has a role balanced between attack and defence. Is positioned on the left side and closer to the touchlines of the pitch. Left midfielders are usually left-footed.
The abbreviation “CM” means Central Midfield. The soccer, the player who plays central midfield(CM) is positioned at the center of the team between the defense and attack. They have a multi-faceted role which includes supporting the defense and the forwards. They are often referred to as the engine room of the team.
Is positioned on the Right side and closer to the touchlines of the pitch. Left midfielders are usually left-footed.They literally strengthen the team in its core and are characterized by constantly being in position to receive and pass the ball. In addition to a number of defensive tasks, they lead the offensive gameplay after receiving the ball from the center backs.
In soccer, the abbreviation “RM” means Right Midfielder. The right midfielder(RM) is positioned on the right-hand side of the midfield. The role of the right midfielder(RM) is to link the team’s defense and attacking players on the right-hand side of the field and support both the offense and defense.
In soccer, the abbreviation “LWB” means Left Wing Back. The left wing back(LWB) is positioned on the left-hand side of a soccer team’s defense. The role of the left wing back(LWB) is to defend the left-hand side of the soccer field from the opposition as well as supporting the teams attacking players by moving up the field when the soccer ball is in the attacking half of the field.
In soccer, the abbreviation “CDM” means central defensive midfielder. The central defensive midfielder(CDM) is positioned at the center of the soccer field, just in front of their team’s defenders, and is positioned the furthest back of the midfielders. The role of the central defensive midfielder (CDM) is to protect the defense and be a link between the defense and midfield.
They are positioned on either side of the centre-back. They defend against opposing wingers in the flanks who try to drive the ball past them or pass to other attackers. They do not traditionally support attacking plays.
In soccer, the abbreviation “RWB” means Right Wing Back. The right wing back(RWB) is positioned on the right-hand side of a soccer team’s defense. The role of the right wing back(RWB) is to defend the right-hand side of the soccer field from the opposition as well as supporting the teams attacking players by moving up the field when the soccer ball is in the attacking half of the field.
In soccer, the abbreviation “LB” means Left Back. The left back(LB) is part of the team’s defense and positioned on the left side of the soccer field. The role of the left back(LB) is to defend the left-hand side of the soccer field and prevent the opposition from scoring a goal.
In soccer, the abbreviation “LCB” means Left Center Back. The left-center back(LCB) is positioned on the left side of the defense on a soccer team. The role of the left-center back(LCB) is to defend the left-hand side of the soccer field and prevent any opposition players, or the soccer ball, from getting past them.
The meaning of the abbreviation “CB” is Center Back. In soccer, the center back(CB) is positioned in the center of the field just in front of the goalkeeper at the center of the team’s defense. The role of the center back(CB) is to protect the team’s goal and prevent any of the opposition’s players, or the soccer, getting past them.
In soccer, the abbreviation “RCB” means Right Center Back. The right center back(RCB) is positioned on the right-hand side of the center of defense. The right center back(RCB) often plays alongside a left center back(LCB) and they cover the center of the defense between them. The role of the right center back(RCB) is to prevent the opposition from scoring a goal.
In soccer, the abbreviation “RB” means Right Back. The right back(RB) is part of the team’s defense and positioned on the right-hand side of the soccer field. The role of the right back(RB) is to defend the right-hand side of the soccer field and prevent the opposition from scoring a goal.
To Design the clustering algorithm to categorize similar players using the traits and their different skills in the field.
For the given data we Perform Clustering Task.
!pip install plotly-express
!pip install plotly.express
Requirement already satisfied: plotly-express in c:\users\vagesh\anaconda3\lib\site-packages (0.4.1) Requirement already satisfied: numpy>=1.11 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly-express) (1.19.2) Requirement already satisfied: scipy>=0.18 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly-express) (1.5.2) Requirement already satisfied: pandas>=0.20.0 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly-express) (1.2.3) Requirement already satisfied: plotly>=4.1.0 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly-express) (4.14.3) Requirement already satisfied: statsmodels>=0.9.0 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly-express) (0.12.0) Requirement already satisfied: patsy>=0.5 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly-express) (0.5.1) Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\vagesh\anaconda3\lib\site-packages (from pandas>=0.20.0->plotly-express) (2.8.1) Requirement already satisfied: pytz>=2017.3 in c:\users\vagesh\anaconda3\lib\site-packages (from pandas>=0.20.0->plotly-express) (2020.1) Requirement already satisfied: retrying>=1.3.3 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly>=4.1.0->plotly-express) (1.3.3) Requirement already satisfied: six in c:\users\vagesh\anaconda3\lib\site-packages (from plotly>=4.1.0->plotly-express) (1.15.0) Requirement already satisfied: plotly.express in c:\users\vagesh\anaconda3\lib\site-packages (0.4.1) Requirement already satisfied: statsmodels>=0.9.0 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly.express) (0.12.0) Requirement already satisfied: patsy>=0.5 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly.express) (0.5.1) Requirement already satisfied: scipy>=0.18 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly.express) (1.5.2) Requirement already satisfied: numpy>=1.11 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly.express) (1.19.2) Requirement already satisfied: plotly>=4.1.0 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly.express) (4.14.3) Requirement already satisfied: pandas>=0.20.0 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly.express) (1.2.3) Requirement already satisfied: six in c:\users\vagesh\anaconda3\lib\site-packages (from patsy>=0.5->plotly.express) (1.15.0) Requirement already satisfied: retrying>=1.3.3 in c:\users\vagesh\anaconda3\lib\site-packages (from plotly>=4.1.0->plotly.express) (1.3.3) Requirement already satisfied: pytz>=2017.3 in c:\users\vagesh\anaconda3\lib\site-packages (from pandas>=0.20.0->plotly.express) (2020.1) Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\vagesh\anaconda3\lib\site-packages (from pandas>=0.20.0->plotly.express) (2.8.1)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
import plotly.graph_objs as go
import plotly.express as px
import warnings
warnings.filterwarnings('ignore')
pd.set_option('display.max_columns',None)
data=pd.read_csv('players_20.csv')
data.head(1)
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 158023 | https://sofifa.com/player/158023/lionel-messi/... | L. Messi | Lionel Andrés Messi Cuccittini | 32 | 1987-06-24 | 170 | 72 | Argentina | FC Barcelona | 94 | 94 | 95500000 | 565000 | RW, CF, ST | Left | 5 | 4 | 4 | Medium/Low | Messi | Yes | 195800000.0 | #Dribbler, #Distance Shooter, #Crosser, #FK Sp... | RW | 10.0 | NaN | 2004-07-01 | 2021.0 | NaN | NaN | 87.0 | 92.0 | 92.0 | 96.0 | 39.0 | 66.0 | NaN | NaN | NaN | NaN | NaN | NaN | Beat Offside Trap, Argues with Officials, Earl... | 88 | 95 | 70 | 92 | 88 | 97 | 93 | 94 | 92 | 96 | 91 | 84 | 93 | 95 | 95 | 86 | 68 | 75 | 68 | 94 | 48 | 40 | 94 | 94 | 75 | 96 | 33 | 37 | 26 | 6 | 11 | 15 | 14 | 8 | 89+2 | 89+2 | 89+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 92+2 | 87+2 | 87+2 | 87+2 | 92+2 | 68+2 | 66+2 | 66+2 | 66+2 | 68+2 | 63+2 | 52+2 | 52+2 | 52+2 | 63+2 |
#Shape of the data
data.shape
(18278, 104)
The data Consists of 18278 rows and 104 columns
#retreving the first five rows using head()
data.head()
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 158023 | https://sofifa.com/player/158023/lionel-messi/... | L. Messi | Lionel Andrés Messi Cuccittini | 32 | 1987-06-24 | 170 | 72 | Argentina | FC Barcelona | 94 | 94 | 95500000 | 565000 | RW, CF, ST | Left | 5 | 4 | 4 | Medium/Low | Messi | Yes | 195800000.0 | #Dribbler, #Distance Shooter, #Crosser, #FK Sp... | RW | 10.0 | NaN | 2004-07-01 | 2021.0 | NaN | NaN | 87.0 | 92.0 | 92.0 | 96.0 | 39.0 | 66.0 | NaN | NaN | NaN | NaN | NaN | NaN | Beat Offside Trap, Argues with Officials, Earl... | 88 | 95 | 70 | 92 | 88 | 97 | 93 | 94 | 92 | 96 | 91 | 84 | 93 | 95 | 95 | 86 | 68 | 75 | 68 | 94 | 48 | 40 | 94 | 94 | 75 | 96 | 33 | 37 | 26 | 6 | 11 | 15 | 14 | 8 | 89+2 | 89+2 | 89+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 92+2 | 87+2 | 87+2 | 87+2 | 92+2 | 68+2 | 66+2 | 66+2 | 66+2 | 68+2 | 63+2 | 52+2 | 52+2 | 52+2 | 63+2 |
| 1 | 20801 | https://sofifa.com/player/20801/c-ronaldo-dos-... | Cristiano Ronaldo | Cristiano Ronaldo dos Santos Aveiro | 34 | 1985-02-05 | 187 | 83 | Portugal | Juventus | 93 | 93 | 58500000 | 405000 | ST, LW | Right | 5 | 4 | 5 | High/Low | C. Ronaldo | Yes | 96500000.0 | #Speedster, #Dribbler, #Distance Shooter, #Acr... | LW | 7.0 | NaN | 2018-07-10 | 2022.0 | LS | 7.0 | 90.0 | 93.0 | 82.0 | 89.0 | 35.0 | 78.0 | NaN | NaN | NaN | NaN | NaN | NaN | Long Throw-in, Selfish, Argues with Officials,... | 84 | 94 | 89 | 83 | 87 | 89 | 81 | 76 | 77 | 92 | 89 | 91 | 87 | 96 | 71 | 95 | 95 | 85 | 78 | 93 | 63 | 29 | 95 | 82 | 85 | 95 | 28 | 32 | 24 | 7 | 11 | 15 | 14 | 11 | 91+3 | 91+3 | 91+3 | 89+3 | 90+3 | 90+3 | 90+3 | 89+3 | 88+3 | 88+3 | 88+3 | 88+3 | 81+3 | 81+3 | 81+3 | 88+3 | 65+3 | 61+3 | 61+3 | 61+3 | 65+3 | 61+3 | 53+3 | 53+3 | 53+3 | 61+3 |
| 2 | 190871 | https://sofifa.com/player/190871/neymar-da-sil... | Neymar Jr | Neymar da Silva Santos Junior | 27 | 1992-02-05 | 175 | 68 | Brazil | Paris Saint-Germain | 92 | 92 | 105500000 | 290000 | LW, CAM | Right | 5 | 5 | 5 | High/Medium | Neymar | Yes | 195200000.0 | #Speedster, #Dribbler, #Playmaker , #Crosser,... | CAM | 10.0 | NaN | 2017-08-03 | 2022.0 | LW | 10.0 | 91.0 | 85.0 | 87.0 | 95.0 | 32.0 | 58.0 | NaN | NaN | NaN | NaN | NaN | NaN | Power Free-Kick, Injury Free, Selfish, Early C... | 87 | 87 | 62 | 87 | 87 | 96 | 88 | 87 | 81 | 95 | 94 | 89 | 96 | 92 | 84 | 80 | 61 | 81 | 49 | 84 | 51 | 36 | 87 | 90 | 90 | 94 | 27 | 26 | 29 | 9 | 9 | 15 | 15 | 11 | 84+3 | 84+3 | 84+3 | 90+3 | 89+3 | 89+3 | 89+3 | 90+3 | 90+3 | 90+3 | 90+3 | 89+3 | 82+3 | 82+3 | 82+3 | 89+3 | 66+3 | 61+3 | 61+3 | 61+3 | 66+3 | 61+3 | 46+3 | 46+3 | 46+3 | 61+3 |
| 3 | 200389 | https://sofifa.com/player/200389/jan-oblak/20/... | J. Oblak | Jan Oblak | 26 | 1993-01-07 | 188 | 87 | Slovenia | Atlético Madrid | 91 | 93 | 77500000 | 125000 | GK | Right | 3 | 3 | 1 | Medium/Medium | Normal | Yes | 164700000.0 | NaN | GK | 13.0 | NaN | 2014-07-16 | 2023.0 | GK | 1.0 | NaN | NaN | NaN | NaN | NaN | NaN | 87.0 | 92.0 | 78.0 | 89.0 | 52.0 | 90.0 | Flair, Acrobatic Clearance | 13 | 11 | 15 | 43 | 13 | 12 | 13 | 14 | 40 | 30 | 43 | 60 | 67 | 88 | 49 | 59 | 78 | 41 | 78 | 12 | 34 | 19 | 11 | 65 | 11 | 68 | 27 | 12 | 18 | 87 | 92 | 78 | 90 | 89 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 4 | 183277 | https://sofifa.com/player/183277/eden-hazard/2... | E. Hazard | Eden Hazard | 28 | 1991-01-07 | 175 | 74 | Belgium | Real Madrid | 91 | 91 | 90000000 | 470000 | LW, CF | Right | 4 | 4 | 4 | High/Medium | Normal | Yes | 184500000.0 | #Speedster, #Dribbler, #Acrobat | LW | 7.0 | NaN | 2019-07-01 | 2024.0 | LF | 10.0 | 91.0 | 83.0 | 86.0 | 94.0 | 35.0 | 66.0 | NaN | NaN | NaN | NaN | NaN | NaN | Beat Offside Trap, Selfish, Finesse Shot, Spee... | 81 | 84 | 61 | 89 | 83 | 95 | 83 | 79 | 83 | 94 | 94 | 88 | 95 | 90 | 94 | 82 | 56 | 84 | 63 | 80 | 54 | 41 | 87 | 89 | 88 | 91 | 34 | 27 | 22 | 11 | 12 | 6 | 8 | 8 | 83+3 | 83+3 | 83+3 | 89+3 | 88+3 | 88+3 | 88+3 | 89+3 | 89+3 | 89+3 | 89+3 | 89+3 | 83+3 | 83+3 | 83+3 | 89+3 | 66+3 | 63+3 | 63+3 | 63+3 | 66+3 | 61+3 | 49+3 | 49+3 | 49+3 | 61+3 |
#retrieving the lost five row using tail()
data.tail()
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 18273 | 245006 | https://sofifa.com/player/245006/shuai-shao/20... | Shao Shuai | 邵帅 | 22 | 1997-03-10 | 186 | 79 | China PR | Beijing Renhe FC | 48 | 56 | 40000 | 2000 | CB | Right | 1 | 3 | 2 | Medium/High | Normal | No | 70000.0 | NaN | RES | 36.0 | NaN | 2018-07-13 | 2019.0 | NaN | NaN | 57.0 | 23.0 | 28.0 | 33.0 | 47.0 | 51.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 21 | 17 | 40 | 35 | 27 | 24 | 23 | 21 | 28 | 35 | 56 | 58 | 45 | 40 | 73 | 36 | 70 | 60 | 47 | 16 | 46 | 48 | 28 | 25 | 39 | 41 | 45 | 50 | 52 | 5 | 5 | 13 | 5 | 14 | 32+2 | 32+2 | 32+2 | 31+2 | 31+2 | 31+2 | 31+2 | 31+2 | 31+2 | 31+2 | 31+2 | 33+2 | 33+2 | 33+2 | 33+2 | 33+2 | 43+2 | 42+2 | 42+2 | 42+2 | 43+2 | 45+2 | 46+2 | 46+2 | 46+2 | 45+2 |
| 18274 | 250995 | https://sofifa.com/player/250995/mingjie-xiao/... | Xiao Mingjie | Mingjie Xiao | 22 | 1997-01-01 | 177 | 66 | China PR | Shanghai SIPG FC | 48 | 56 | 40000 | 2000 | CB | Right | 1 | 2 | 2 | Medium/Medium | Normal | No | 72000.0 | NaN | SUB | 31.0 | NaN | 2019-02-01 | 2022.0 | NaN | NaN | 58.0 | 24.0 | 33.0 | 35.0 | 48.0 | 48.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 24 | 20 | 42 | 43 | 28 | 32 | 24 | 29 | 39 | 31 | 55 | 61 | 43 | 41 | 76 | 33 | 72 | 55 | 44 | 20 | 42 | 49 | 23 | 25 | 37 | 35 | 42 | 53 | 57 | 13 | 6 | 14 | 11 | 9 | 33+2 | 33+2 | 33+2 | 33+2 | 32+2 | 32+2 | 32+2 | 33+2 | 33+2 | 33+2 | 33+2 | 35+2 | 36+2 | 36+2 | 36+2 | 35+2 | 44+2 | 43+2 | 43+2 | 43+2 | 44+2 | 46+2 | 47+2 | 47+2 | 47+2 | 46+2 |
| 18275 | 252332 | https://sofifa.com/player/252332/wei-zhang/20/... | Zhang Wei | 张威 | 19 | 2000-05-16 | 186 | 75 | China PR | Hebei China Fortune FC | 48 | 56 | 40000 | 1000 | CM | Right | 1 | 2 | 2 | Low/Medium | Lean | No | 70000.0 | NaN | SUB | 38.0 | NaN | 2019-01-01 | 2019.0 | NaN | NaN | 54.0 | 35.0 | 44.0 | 45.0 | 48.0 | 51.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 32 | 33 | 49 | 53 | 32 | 40 | 32 | 32 | 55 | 49 | 55 | 54 | 52 | 52 | 57 | 48 | 60 | 50 | 51 | 26 | 50 | 45 | 38 | 38 | 36 | 39 | 46 | 52 | 46 | 7 | 8 | 10 | 6 | 14 | 43+2 | 43+2 | 43+2 | 43+2 | 43+2 | 43+2 | 43+2 | 43+2 | 44+2 | 44+2 | 44+2 | 45+2 | 46+2 | 46+2 | 46+2 | 45+2 | 47+2 | 49+2 | 49+2 | 49+2 | 47+2 | 47+2 | 49+2 | 49+2 | 49+2 | 47+2 |
| 18276 | 251110 | https://sofifa.com/player/251110/haijian-wang/... | Wang Haijian | 汪海健 | 18 | 2000-08-02 | 185 | 74 | China PR | Shanghai Greenland Shenhua FC | 48 | 54 | 40000 | 1000 | CM | Right | 1 | 2 | 2 | Low/Low | Lean | No | 70000.0 | NaN | SUB | 33.0 | NaN | 2019-02-01 | 2022.0 | NaN | NaN | 59.0 | 35.0 | 47.0 | 47.0 | 45.0 | 52.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 39 | 34 | 47 | 54 | 28 | 42 | 37 | 39 | 48 | 49 | 55 | 63 | 55 | 54 | 59 | 46 | 61 | 42 | 55 | 28 | 57 | 49 | 31 | 48 | 36 | 40 | 39 | 44 | 54 | 14 | 9 | 13 | 13 | 13 | 43+2 | 43+2 | 43+2 | 45+2 | 44+2 | 44+2 | 44+2 | 45+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 48+2 | 48+2 | 48+2 | 48+2 | 48+2 | 48+2 | 49+2 | 49+2 | 49+2 | 48+2 |
| 18277 | 233449 | https://sofifa.com/player/233449/ximing-pan/20... | Pan Ximing | 潘喜明 | 26 | 1993-01-11 | 182 | 78 | China PR | Hebei China Fortune FC | 48 | 51 | 40000 | 2000 | CM | Right | 1 | 3 | 2 | Medium/Medium | Normal | No | NaN | NaN | SUB | 37.0 | Tianjin TEDA FC | NaN | 2019.0 | NaN | NaN | 60.0 | 32.0 | 51.0 | 45.0 | 47.0 | 55.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 44 | 30 | 48 | 58 | 25 | 40 | 34 | 35 | 52 | 46 | 54 | 64 | 52 | 49 | 71 | 41 | 64 | 40 | 61 | 30 | 54 | 47 | 29 | 52 | 38 | 42 | 52 | 42 | 48 | 8 | 12 | 14 | 9 | 10 | 42+2 | 42+2 | 42+2 | 44+2 | 43+2 | 43+2 | 43+2 | 44+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 46+2 | 48+2 | 49+2 | 49+2 | 49+2 | 48+2 | 48+2 | 50+2 | 50+2 | 50+2 | 48+2 |
##Describing the numerical data
data.describe().T
| count | mean | std | min | 25% | 50% | 75% | max | |
|---|---|---|---|---|---|---|---|---|
| sofifa_id | 18278.0 | 219738.864482 | 27960.200461 | 768.0 | 204445.5 | 226165.0 | 240795.75 | 252905.0 |
| age | 18278.0 | 25.283291 | 4.656964 | 16.0 | 22.0 | 25.0 | 29.00 | 42.0 |
| height_cm | 18278.0 | 181.362184 | 6.756961 | 156.0 | 177.0 | 181.0 | 186.00 | 205.0 |
| weight_kg | 18278.0 | 75.276343 | 7.047744 | 50.0 | 70.0 | 75.0 | 80.00 | 110.0 |
| overall | 18278.0 | 66.244994 | 6.949953 | 48.0 | 62.0 | 66.0 | 71.00 | 94.0 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| goalkeeping_diving | 18278.0 | 16.572765 | 17.738069 | 1.0 | 8.0 | 11.0 | 14.00 | 90.0 |
| goalkeeping_handling | 18278.0 | 16.354853 | 16.996925 | 1.0 | 8.0 | 11.0 | 14.00 | 92.0 |
| goalkeeping_kicking | 18278.0 | 16.212934 | 16.613665 | 1.0 | 8.0 | 11.0 | 14.00 | 93.0 |
| goalkeeping_positioning | 18278.0 | 16.368038 | 17.136497 | 1.0 | 8.0 | 11.0 | 14.00 | 91.0 |
| goalkeeping_reflexes | 18278.0 | 16.709924 | 18.038125 | 1.0 | 8.0 | 11.0 | 14.00 | 92.0 |
61 rows × 8 columns
#Describing the categorical data
data.describe(include='O').T
| count | unique | top | freq | |
|---|---|---|---|---|
| player_url | 18278 | 18278 | https://sofifa.com/player/246848/boubacar-fofa... | 1 |
| short_name | 18278 | 17354 | J. Rodríguez | 11 |
| long_name | 18278 | 18218 | Liam Kelly | 3 |
| dob | 18278 | 6142 | 1992-02-29 | 113 |
| nationality | 18278 | 162 | England | 1667 |
| club | 18278 | 698 | Southampton | 33 |
| player_positions | 18278 | 643 | CB | 2322 |
| preferred_foot | 18278 | 2 | Right | 13960 |
| work_rate | 18278 | 9 | Medium/Medium | 9875 |
| body_type | 18278 | 10 | Normal | 10750 |
| real_face | 18278 | 2 | No | 16310 |
| player_tags | 1499 | 83 | #Strength | 514 |
| team_position | 18038 | 29 | SUB | 7820 |
| loaned_from | 1048 | 316 | Atalanta | 17 |
| joined | 16990 | 1760 | 2019-07-01 | 1465 |
| nation_position | 1126 | 26 | SUB | 587 |
| player_traits | 7566 | 921 | Early Crosser | 501 |
| ls | 16242 | 94 | 61+2 | 725 |
| st | 16242 | 94 | 61+2 | 725 |
| rs | 16242 | 94 | 61+2 | 725 |
| lw | 16242 | 107 | 63+2 | 736 |
| lf | 16242 | 103 | 63+2 | 727 |
| cf | 16242 | 103 | 63+2 | 727 |
| rf | 16242 | 103 | 63+2 | 727 |
| rw | 16242 | 107 | 63+2 | 736 |
| lam | 16242 | 103 | 61+2 | 748 |
| cam | 16242 | 103 | 61+2 | 748 |
| ram | 16242 | 103 | 61+2 | 748 |
| lm | 16242 | 100 | 61+2 | 809 |
| lcm | 16242 | 88 | 58+2 | 775 |
| cm | 16242 | 88 | 58+2 | 775 |
| rcm | 16242 | 88 | 58+2 | 775 |
| rm | 16242 | 100 | 61+2 | 809 |
| lwb | 16242 | 98 | 59+2 | 682 |
| ldm | 16242 | 98 | 59+2 | 636 |
| cdm | 16242 | 98 | 59+2 | 636 |
| rdm | 16242 | 98 | 59+2 | 636 |
| rwb | 16242 | 98 | 59+2 | 682 |
| lb | 16242 | 96 | 61+2 | 667 |
| lcb | 16242 | 110 | 63+2 | 621 |
| cb | 16242 | 110 | 63+2 | 621 |
| rcb | 16242 | 110 | 63+2 | 621 |
| rb | 16242 | 96 | 61+2 | 667 |
data.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 18278 entries, 0 to 18277 Columns: 104 entries, sofifa_id to rb dtypes: float64(16), int64(45), object(43) memory usage: 14.5+ MB
WE have 104 columns and 18278 rows in the data. The of their datatypes are:
#104 column names
for i in data.columns:
print(i)
sofifa_id player_url short_name long_name age dob height_cm weight_kg nationality club overall potential value_eur wage_eur player_positions preferred_foot international_reputation weak_foot skill_moves work_rate body_type real_face release_clause_eur player_tags team_position team_jersey_number loaned_from joined contract_valid_until nation_position nation_jersey_number pace shooting passing dribbling defending physic gk_diving gk_handling gk_kicking gk_reflexes gk_speed gk_positioning player_traits attacking_crossing attacking_finishing attacking_heading_accuracy attacking_short_passing attacking_volleys skill_dribbling skill_curve skill_fk_accuracy skill_long_passing skill_ball_control movement_acceleration movement_sprint_speed movement_agility movement_reactions movement_balance power_shot_power power_jumping power_stamina power_strength power_long_shots mentality_aggression mentality_interceptions mentality_positioning mentality_vision mentality_penalties mentality_composure defending_marking defending_standing_tackle defending_sliding_tackle goalkeeping_diving goalkeeping_handling goalkeeping_kicking goalkeeping_positioning goalkeeping_reflexes ls st rs lw lf cf rf rw lam cam ram lm lcm cm rcm rm lwb ldm cdm rdm rwb lb lcb cb rcb rb
cat_columns=[n for n in data.columns if data[n].dtypes=='object']
len(cat_columns)
43
Categorical columns are 43
numerical=[n for n in data.columns if data[n].dtypes!='object']
len(numerical)
61
numerical columns are 61
data[data.columns[data.isna().any()]].head(1)
| release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 195800000.0 | #Dribbler, #Distance Shooter, #Crosser, #FK Sp... | RW | 10.0 | NaN | 2004-07-01 | 2021.0 | NaN | NaN | 87.0 | 92.0 | 92.0 | 96.0 | 39.0 | 66.0 | NaN | NaN | NaN | NaN | NaN | NaN | Beat Offside Trap, Argues with Officials, Earl... | 89+2 | 89+2 | 89+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 92+2 | 87+2 | 87+2 | 87+2 | 92+2 | 68+2 | 66+2 | 66+2 | 66+2 | 68+2 | 63+2 | 52+2 | 52+2 | 52+2 | 63+2 |
tot_null_columns=data.columns[data.isnull().any()]
a=data[tot_null_columns].isnull().sum()
a.head(49)
release_clause_eur 1298 player_tags 16779 team_position 240 team_jersey_number 240 loaned_from 17230 joined 1288 contract_valid_until 240 nation_position 17152 nation_jersey_number 17152 pace 2036 shooting 2036 passing 2036 dribbling 2036 defending 2036 physic 2036 gk_diving 16242 gk_handling 16242 gk_kicking 16242 gk_reflexes 16242 gk_speed 16242 gk_positioning 16242 player_traits 10712 ls 2036 st 2036 rs 2036 lw 2036 lf 2036 cf 2036 rf 2036 rw 2036 lam 2036 cam 2036 ram 2036 lm 2036 lcm 2036 cm 2036 rcm 2036 rm 2036 lwb 2036 ldm 2036 cdm 2036 rdm 2036 rwb 2036 lb 2036 lcb 2036 cb 2036 rcb 2036 rb 2036 dtype: int64
len(a)
48
There are 48 columns are consists of missing values.
missing_data = a.sort_values(ascending=False)
missing_data = missing_data.reset_index(drop = False)
missing_data = missing_data.rename(columns={"index": "Columns", 0:"missing_Values"})
missing_data['percentage'] = (missing_data['missing_Values']/len(data))*100
missing_data.head(5)
| Columns | missing_Values | percentage | |
|---|---|---|---|
| 0 | loaned_from | 17230 | 94.266331 |
| 1 | nation_jersey_number | 17152 | 93.839589 |
| 2 | nation_position | 17152 | 93.839589 |
| 3 | player_tags | 16779 | 91.798884 |
| 4 | gk_positioning | 16242 | 88.860926 |
missing_data[missing_data['percentage']<=11]
| Columns | missing_Values | percentage | |
|---|---|---|---|
| 43 | release_clause_eur | 1298 | 7.101433 |
| 44 | joined | 1288 | 7.046723 |
| 45 | contract_valid_until | 240 | 1.313054 |
| 46 | team_jersey_number | 240 | 1.313054 |
| 47 | team_position | 240 | 1.313054 |
import plotly.express as px
sample = missing_data[missing_data['percentage']>11]
fig = px.pie(sample, names='Columns', values='percentage',
color_discrete_sequence=px.colors.sequential.Plasma_r,
title='More than 11 Percentage of Missing values Columns',height=700)
fig.update_traces(textposition='inside', textinfo='label')
fig.update_layout(paper_bgcolor='rgba(0,0,0,0)',
plot_bgcolor='rgba(1,1,1,1)',
font=dict(family='Cambria, monospace', size=12, color='#000000'))
fig.show()
#categorical columns are assign to the data2 variable
data1=data[['player_url','short_name','long_name','dob','nationality','club','player_positions','preferred_foot','work_rate','body_type','real_face','player_tags','team_position','loaned_from',
'joined','nation_position','player_traits','ls','st','rs','lw','lf','cf','rf','rw','lam','cam','ram','lm','lcm','cm','rcm','rm','lwb','ldm','cdm','rdm','rwb','lb','lcb','cb','rcb','rb']]
#missing values in numerical columns
null_columns=data1.columns[data1.isnull().any()]
cat_null=data1[null_columns].isnull().sum()
len(cat_null)
32
There are 32 categorical columns consits of missing values.
#Numerical columns are assign to the data1 variable
data2=data[['sofifa_id', 'age','height_cm','weight_kg','overall','potential','value_eur','wage_eur','international_reputation','weak_foot', 'skill_moves','release_clause_eur','team_jersey_number','contract_valid_until','nation_jersey_number',
'pace','shooting','passing','dribbling','defending','physic','gk_diving','gk_handling','gk_kicking','gk_reflexes','gk_speed','gk_positioning','attacking_crossing','attacking_finishing','attacking_heading_accuracy','attacking_short_passing',
'attacking_volleys','skill_dribbling','skill_curve','skill_fk_accuracy','skill_long_passing','skill_ball_control','movement_acceleration','movement_sprint_speed','movement_agility','movement_reactions','movement_balance','power_shot_power',
'power_jumping','power_stamina','power_strength','power_long_shots','mentality_aggression','mentality_interceptions','mentality_positioning', 'mentality_vision','mentality_penalties','mentality_composure','defending_marking','defending_standing_tackle',
'defending_sliding_tackle','goalkeeping_diving','goalkeeping_handling','goalkeeping_kicking','goalkeeping_positioning', 'goalkeeping_reflexes']]
#missing values in numerical columns
nul_columns=data2.columns[data2.isnull().any()]
num_null=data2[nul_columns].isnull().sum()
len(num_null)
16
There is 16 numerical columns are the consists of missing values.
import plotly.graph_objs as go
import plotly.express as px
plt.figure(figsize=(14,5))
plt.title('Age Distribution FIFA 20',fontsize=20)
sns.distplot(a=data['age'], kde=True, bins=20,color='indigo')
plt.axvline(x=np.mean(data['age']),c='tomato',label='Mean Age of All Players')
plt.legend()
plt.show()
print('-----------------------------------------------------------------------------------------------------------------','\n',)
print('Insights:')
print('average age of all players: ',round(np.mean(data['age'])), ) #data['age'].mean()
print('The age of the youngest player is: ',data['age'].min())
print('The age of the oldest player is: ',np.max(data['age']))
print('Youngest Players:')
print('Total No of youngest players in the data:',len(data.loc[data['age'] == data['age'].min()]))
print('Oldest Players:')
print('Total No of oldest players in the data:', len(data.loc[data['age'] == data['age'].max()]))
----------------------------------------------------------------------------------------------------------------- Insights: average age of all players: 25 The age of the youngest player is: 16 The age of the oldest player is: 42 Youngest Players: Total No of youngest players in the data: 12 Oldest Players: Total No of oldest players in the data: 2
data.sort_values('age', ascending = True)[['short_name', 'age', 'club', 'nationality']].head(15).style.background_gradient('viridis')
| short_name | age | club | nationality | |
|---|---|---|---|---|
| 18171 | J. Starbuck | 16 | Grimsby Town | England |
| 4764 | A. Hložek | 16 | Sparta Praha | Czech Republic |
| 18243 | E. Sartorius | 16 | Lincoln City | England |
| 17827 | D. Burns | 16 | St. Patrick's Athletic | Northern Ireland |
| 17614 | D. Obbekjær | 16 | Odense Boldklub | Denmark |
| 17782 | S. Anderson | 16 | Colorado Rapids | United States |
| 18242 | R. Wikberg | 16 | Östersunds FK | Sweden |
| 18031 | O. Stefánsson | 16 | IFK Norrköping | Iceland |
| 14626 | A. Velasco | 16 | Independiente | Argentina |
| 12160 | S. Esposito | 16 | Inter | Italy |
| 12158 | E. Millot | 16 | AS Monaco | France |
| 6630 | Fábio Silva | 16 | FC Porto | Portugal |
| 13979 | N. Wood | 17 | Middlesbrough | England |
| 13981 | M. Olise | 17 | Reading | France |
| 13987 | F. Tolomello | 17 | Trapani | Italy |
data.sort_values('age', ascending = False)[['short_name', 'age', 'club', 'nationality']].head(15).style.background_gradient('inferno')
| short_name | age | club | nationality | |
|---|---|---|---|---|
| 13003 | H. Sulaimani | 42 | Al Ahli | Saudi Arabia |
| 11832 | C. Muñoz | 42 | CD Universidad de Concepción | Argentina |
| 200 | G. Buffon | 41 | Juventus | Italy |
| 3706 | C. Lucchetti | 41 | Atlético Tucumán | Argentina |
| 10665 | F. Kippe | 41 | Lillestrøm SK | Norway |
| 868 | Hilton | 41 | Montpellier HSC | Brazil |
| 2965 | Cifuentes | 40 | Cádiz CF | Spain |
| 15812 | M. Gurski | 40 | SpVgg Unterhaching | Germany |
| 8359 | F. Cubero | 40 | Vélez Sarsfield | Argentina |
| 2963 | D. Dainelli | 40 | Livorno | Italy |
| 14527 | D. Bulman | 40 | Crawley Town | England |
| 6235 | J. Gillet | 40 | Standard de Liège | Belgium |
| 10702 | M. Caranta | 40 | Club Atlético Talleres | Argentina |
| 7230 | Lee Dong Gook | 40 | Jeonbuk Hyundai Motors | Korea Republic |
| 1880 | C. Pizarro | 40 | SV Werder Bremen | Peru |
plt.figure(figsize=(18,8))
plt.title('Height(in centimeters) Distribution FIFA 20', fontsize=20)
sns.distplot(a=data['height_cm'], kde=True, bins=20,color='aquamarine')
plt.axvline(x=np.mean(data['height_cm']),c='orange',label='Mean Height of All Players')
plt.legend()
plt.show()
print('-----------------------------------------------------------------------------------------------------------------------------','\n',)
print('Insights:')
print('average height of all players: ',round(np.mean(data['height_cm'])),"cm's")
print('The height of the shortest player is: ',data['height_cm'].min(),"cm's")
print('The height of the tallest player is: ',np.max(data['height_cm']),"cm's")
print('shortestst players:')
print('Total No of shortestst players in the data:',len(data.loc[data['height_cm'] == data['height_cm'].min()]))
print('Tallest Players:')
print('Total No of tallest players in the data:', len(data.loc[data['height_cm'] == data['height_cm'].max()]))
----------------------------------------------------------------------------------------------------------------------------- Insights: average height of all players: 181 cm's The height of the shortest player is: 156 cm's The height of the tallest player is: 205 cm's shortestst players: Total No of shortestst players in the data: 1 Tallest Players: Total No of tallest players in the data: 1
data.loc[data['height_cm'] == data['height_cm'].min()]
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 4829 | 237994 | https://sofifa.com/player/237994/nahuel-barrio... | N. Barrios | Cristian Nahuel Barrios | 21 | 1998-05-07 | 156 | 58 | Argentina | San Lorenzo de Almagro | 70 | 80 | 2900000 | 8000 | LM, CAM, LW | Right | 1 | 3 | 3 | High/Low | Normal | No | 4900000.0 | NaN | RW | 28.0 | NaN | 2017-01-01 | 2022.0 | NaN | NaN | 76.0 | 63.0 | 67.0 | 72.0 | 40.0 | 38.0 | NaN | NaN | NaN | NaN | NaN | NaN | Finesse Shot, Crowd Favourite | 63 | 63 | 47 | 73 | 51 | 73 | 63 | 45 | 65 | 70 | 84 | 70 | 70 | 65 | 94 | 65 | 63 | 51 | 28 | 64 | 42 | 26 | 66 | 67 | 57 | 65 | 44 | 40 | 51 | 13 | 8 | 7 | 12 | 6 | 63+2 | 63+2 | 63+2 | 69+2 | 68+2 | 68+2 | 68+2 | 69+2 | 69+2 | 69+2 | 69+2 | 68+2 | 63+2 | 63+2 | 63+2 | 68+2 | 56+2 | 52+2 | 52+2 | 52+2 | 56+2 | 54+2 | 44+2 | 44+2 | 44+2 | 54+2 |
N. Barrios is the shortest person in the data
data.loc[data['height_cm'] == data['height_cm'].max()]
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 9208 | 199321 | https://sofifa.com/player/199321/tomas-holy/20... | T. Holý | Tomáš Holý | 27 | 1991-12-10 | 205 | 102 | Czech Republic | Ipswich Town | 66 | 70 | 575000 | 3000 | GK | Right | 1 | 3 | 1 | Medium/Medium | Normal | No | 1000000.0 | NaN | GK | 1.0 | NaN | 2019-07-01 | 2021.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 71.0 | 60.0 | 56.0 | 69.0 | 28.0 | 65.0 | Swerve Pass | 13 | 18 | 18 | 18 | 20 | 16 | 20 | 14 | 29 | 19 | 22 | 33 | 35 | 58 | 41 | 42 | 48 | 19 | 60 | 16 | 21 | 15 | 9 | 30 | 23 | 43 | 16 | 25 | 25 | 71 | 60 | 56 | 65 | 69 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
T. Holý is the tallest players in the data
plt.figure(figsize=(10,5))
sns.regplot(x="age", y="height_cm", data=data)
print("Showing Relations between Age and Height ")
Showing Relations between Age and Height
plt.figure(figsize=(18,8))
plt.title('Weight(in Kgs) Distribution FIFA 20', fontsize=20)
sns.distplot(a=data['weight_kg'], kde=True, bins=20,color='goldenrod')
plt.axvline(x=np.mean(data['weight_kg']),c='green',label='Mean Weight of All Players')
plt.legend()
plt.show()
print('-----------------------------------------------------------------------------------------------------------------','\n',)
print('Insights:')
print('average weight of all players: ',round(np.mean(data['weight_kg'])),"kg's")
print('The lowest weight is: ',data['weight_kg'].min(),"kg's")
print('The highest weight player is: ',np.max(data['weight_kg']),"kg's")
print('lowest weight players:-----')
print('Total No of lowest weight players in the data:',len(data.loc[data['weight_kg'] == data['weight_kg'].min()]))
print('Heighest weight Players:-----------')
print('Total No of highest weight players in the data:', len(data.loc[data['weight_kg'] == data['weight_kg'].max()]))
----------------------------------------------------------------------------------------------------------------- Insights: average weight of all players: 75 kg's The lowest weight is: 50 kg's The highest weight player is: 110 kg's lowest weight players:----- Total No of lowest weight players in the data: 1 Heighest weight Players:----------- Total No of highest weight players in the data: 1
data.loc[data['weight_kg'] == data['weight_kg'].min()]
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 13070 | 235600 | https://sofifa.com/player/235600/bandar-al-mut... | B. Al Mutairi | Bandar Al Mutairi | 29 | 1990-03-14 | 168 | 50 | Saudi Arabia | Al Fayha | 63 | 63 | 300000 | 4000 | LWB | Left | 1 | 3 | 2 | Medium/Medium | Lean | No | 495000.0 | NaN | LWB | 3.0 | NaN | 2019-07-06 | 2022.0 | NaN | NaN | 82.0 | 28.0 | 52.0 | 58.0 | 56.0 | 64.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 61 | 22 | 41 | 56 | 31 | 55 | 57 | 38 | 45 | 56 | 81 | 83 | 76 | 54 | 72 | 34 | 70 | 86 | 56 | 29 | 55 | 54 | 51 | 43 | 37 | 53 | 58 | 61 | 56 | 7 | 6 | 13 | 8 | 9 | 46+2 | 46+2 | 46+2 | 54+2 | 50+2 | 50+2 | 50+2 | 54+2 | 51+2 | 51+2 | 51+2 | 57+2 | 52+2 | 52+2 | 52+2 | 57+2 | 62+2 | 56+2 | 56+2 | 56+2 | 62+2 | 61+2 | 56+2 | 56+2 | 56+2 | 61+2 |
The lowest weighted player in the weight column is 'B. Al Mutairi'
data.loc[data['weight_kg'] == data['weight_kg'].max()]
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 10693 | 156321 | https://sofifa.com/player/156321/adebayo-akinf... | A. Akinfenwa | Adebayo Akinfenwa | 37 | 1982-05-10 | 178 | 110 | England | Wycombe Wanderers | 65 | 65 | 190000 | 2000 | ST | Right | 1 | 3 | 2 | Low/Low | Akinfenwa | Yes | 333000.0 | #Strength | ST | 20.0 | NaN | 2016-07-10 | 2020.0 | NaN | NaN | 43.0 | 63.0 | 54.0 | 56.0 | 35.0 | 81.0 | NaN | NaN | NaN | NaN | NaN | NaN | Diver, Long Passer (CPU AI Only) | 44 | 64 | 72 | 60 | 59 | 52 | 50 | 42 | 51 | 67 | 37 | 48 | 35 | 61 | 71 | 70 | 49 | 69 | 97 | 54 | 66 | 17 | 68 | 61 | 64 | 67 | 32 | 40 | 24 | 14 | 7 | 15 | 6 | 16 | 64+2 | 64+2 | 64+2 | 56+2 | 60+2 | 60+2 | 60+2 | 56+2 | 58+2 | 58+2 | 58+2 | 56+2 | 57+2 | 57+2 | 57+2 | 56+2 | 44+2 | 49+2 | 49+2 | 49+2 | 44+2 | 43+2 | 48+2 | 48+2 | 48+2 | 43+2 |
The highest weighted player in the weight column is 'A. Akinfenwa'
plt.figure(figsize=(10,5))
sns.regplot(x="age", y="weight_kg", data=data)
print("Showing Relations between Age and weight_kg ")
Showing Relations between Age and weight_kg
plt.figure(figsize=(30,10))
sns.relplot(x=data.weight_kg,y=data.height_cm,hue=data.age,sizes=(20, 200),legend="full",palette="deep",kind='scatter')
plt.title('Relationship between Weight and Height with age', fontsize=12)
plt.show()
print('Insight:')
print('When height increase automatic weight is also increase with different age players')
<Figure size 2160x720 with 0 Axes>
Insight: When height increase automatic weight is also increase with different age players
plt.figure(figsize=(20,8))
data.nationality.value_counts()[:50].plot(kind='bar',color = 'lightgreen')
plt.title('Players from different countries present in FIFA-2021')
plt.xlabel('Nationality')
plt.ylabel('Count')
plt.show()
print('Insights:')
print("1. Most of the players are belonging to England from top 50")
print("2. Very few player are belonging to Canada from the top 50")
Insights: 1. Most of the players are belonging to England from top 50 2. Very few player are belonging to Canada from the top 50
print('No of countries in the nationality column is: ',data.nationality.nunique())
No of countries in the nationality column is: 162
plt.figure(figsize=(20,8))
data.club.value_counts()[:50].plot(kind='bar',color = 'lightgreen')
plt.title('Players from different clubs present in FIFA-2020')
plt.xlabel('Nationality')
plt.ylabel('Count')
plt.show()
print('Insights:')
print('Top 49 clbs are consists of the 33 players in each club')
Insights: Top 49 clbs are consists of the 33 players in each club
print('No of clubs inthe club column is :',data.club.nunique())
No of clubs inthe club column is : 698
plt.figure(figsize=(14, 7))
sns.distplot(data['overall'],bins=20,color='green')
plt.title("Overall Rating")
plt.axvline(x=np.mean(data['overall']),c='orange',label='Mean overall of All Players')
plt.legend()
plt.show()
print('-----------------------------------------------------------------------------------------------------------------','\n',)
print('Insights:')
print('average overall rating of all players: ',round(np.mean(data['overall'])),"overall rating")
print('The lowest overall rating is: ',data['overall'].min(),"overall rating")
print('The highest overall rating is: ',np.max(data['overall']),"overall rating")
print('lowest overall players:-----')
print('Total No of lowest overall players in the data:',len(data.loc[data['overall'] == data['overall'].min()]),'players')
print('highest overall rating Players:-----------')
print('Total No of highest overall rating players in the data:', len(data.loc[data['overall'] == data['overall'].max()]),'player')
----------------------------------------------------------------------------------------------------------------- Insights: average overall rating of all players: 66 overall rating The lowest overall rating is: 48 overall rating The highest overall rating is: 94 overall rating lowest overall players:----- Total No of lowest overall players in the data: 43 players highest overall rating Players:----------- Total No of highest overall rating players in the data: 1 player
top_overall=data.sort_values("overall", axis = 0,
ascending = False)[['short_name','nationality', 'club', 'overall', 'potential', 'value_eur']]
top_overall.head(10)
| short_name | nationality | club | overall | potential | value_eur | |
|---|---|---|---|---|---|---|
| 0 | L. Messi | Argentina | FC Barcelona | 94 | 94 | 95500000 |
| 1 | Cristiano Ronaldo | Portugal | Juventus | 93 | 93 | 58500000 |
| 2 | Neymar Jr | Brazil | Paris Saint-Germain | 92 | 92 | 105500000 |
| 3 | J. Oblak | Slovenia | Atlético Madrid | 91 | 93 | 77500000 |
| 4 | E. Hazard | Belgium | Real Madrid | 91 | 91 | 90000000 |
| 5 | K. De Bruyne | Belgium | Manchester City | 91 | 91 | 90000000 |
| 6 | M. ter Stegen | Germany | FC Barcelona | 90 | 93 | 67500000 |
| 7 | V. van Dijk | Netherlands | Liverpool | 90 | 91 | 78000000 |
| 8 | L. Modrić | Croatia | Real Madrid | 90 | 90 | 45000000 |
| 9 | M. Salah | Egypt | Liverpool | 90 | 90 | 80500000 |
fig = px.pie(top_overall.head(10), names='club',
title='Percentage of Clubs in top 10 players on the basis of rating ',color_discrete_sequence=px.colors.sequential.Plasma_r, )
fig.show()
fig = px.pie(top_overall.head(10), names='nationality',
title='Percentage of Nations in top 10 players on the basis of rating')
fig.show()
plt.figure(figsize=(14, 7))
sns.distplot(data['potential'],bins=20,color='pink')
plt.title("potentiality of the players")
plt.axvline(x=np.mean(data['potential']),c='orange',label='Mean potential of All Players')
plt.legend()
plt.show()
print('-----------------------------------------------------------------------------------------------------------------','\n',)
print('Insights:')
print('average potentiality of all players: ',round(np.mean(data['potential'])),"potentiality")
print('The lowest potentiality is: ',data['potential'].min(),"potentiality")
print('The highest potentiality is: ',np.max(data['potential']),"potentiality")
print('lowest potentiality players:-----')
print('Total No of lowest potentiality players in the data:',len(data.loc[data['potential'] == data['potential'].min()]),'players')
print('highest potentiality Players:-----------')
print('Total No of highest potentiality players in the data:', len(data.loc[data['potential'] == data['potential'].max()]),'player')
----------------------------------------------------------------------------------------------------------------- Insights: average potentiality of all players: 72 potentiality The lowest potentiality is: 49 potentiality The highest potentiality is: 95 potentiality lowest potentiality players:----- Total No of lowest potentiality players in the data: 2 players highest potentiality Players:----------- Total No of highest potentiality players in the data: 1 player
top_potentiality=data.sort_values("potential", axis = 0,
ascending = False)[['short_name','nationality', 'club', 'overall', 'potential', 'value_eur']]
top_potentiality.head(10)
| short_name | nationality | club | overall | potential | value_eur | |
|---|---|---|---|---|---|---|
| 10 | K. Mbappé | France | Paris Saint-Germain | 89 | 95 | 93500000 |
| 0 | L. Messi | Argentina | FC Barcelona | 94 | 94 | 95500000 |
| 6 | M. ter Stegen | Germany | FC Barcelona | 90 | 93 | 67500000 |
| 73 | M. de Ligt | Netherlands | Juventus | 85 | 93 | 50000000 |
| 1 | Cristiano Ronaldo | Portugal | Juventus | 93 | 93 | 58500000 |
| 411 | João Félix | Portugal | Atlético Madrid | 80 | 93 | 28000000 |
| 3 | J. Oblak | Slovenia | Atlético Madrid | 91 | 93 | 77500000 |
| 74 | G. Donnarumma | Italy | Milan | 85 | 92 | 41500000 |
| 108 | J. Sancho | England | Borussia Dortmund | 84 | 92 | 44500000 |
| 109 | K. Havertz | Germany | Bayer 04 Leverkusen | 84 | 92 | 46000000 |
fig = px.pie(top_potentiality.head(10), names='club',
title='Percentage of Clubs in top 10 players on the basis of potentiality',color_discrete_sequence=px.colors.sequential.Plasma_r, )
fig.show()
fig = px.pie(top_potentiality.head(10), names='nationality',
title='Percentage of Nations in top 10 players on the basis of potentiality')
fig.show()
plt.figure(figsize=(14, 7))
sns.distplot(data['value_eur'],color='maroon')
plt.title("value_eur of the players")
plt.axvline(x=np.mean(data['value_eur']),c='gold',label='Mean potential of All Players')
plt.legend()
plt.show()
print('-----------------------------------------------------------------------------------------------------------------','\n',)
print('Insights:')
print('average value_eur of all players: ',round(np.mean(data['value_eur'])),"value_eur")
print('The lowest value_eur is: ',data['value_eur'].min(),"value_eur")
print('The highest value_eur is: ',np.max(data['value_eur']),"value_eur")
print('lowest value_eur players:-----')
print('Total No of lowest value_eur players in the data:',len(data.loc[data['value_eur'] == data['value_eur'].min()]),'players')
print('highest value_eur Players:-----------')
print('Total No of highest value_eur players in the data:', len(data.loc[data['value_eur'] == data['value_eur'].max()]),'player')
----------------------------------------------------------------------------------------------------------------- Insights: average value_eur of all players: 2484038 value_eur The lowest value_eur is: 0 value_eur The highest value_eur is: 105500000 value_eur lowest value_eur players:----- Total No of lowest value_eur players in the data: 250 players highest value_eur Players:----------- Total No of highest value_eur players in the data: 1 player
sns.scatterplot(y=data.value_eur,x=data.overall)
plt.title('Relationship between value_eur and overall')
plt.show()
print('Whenever overall increases than automatically value_eur also increases')
Whenever overall increases than automatically value_eur also increases
plt.title('Relationship between value_eur and potential')
sns.scatterplot(y=data.value_eur,x=data.potential)
plt.show()
print('whenever potential increases than automatically value_eur also increases')
whenever potential increases than automatically value_eur also increases
data.preferred_foot.value_counts()
Right 13960 Left 4318 Name: preferred_foot, dtype: int64
plt.figure(figsize=(14, 7))
colors=['wheat','tan']
plt.title('percentage of prefered foot of players',fontsize=20,loc='right')
plt.pie(data.preferred_foot.value_counts(),labels=['Right','Left'],startangle=90,autopct='%1.0f%%',colors=colors,)
plt.show()
print('-----------------------------------------------------------------')
print('Insights:')
print("percentage of people are prefering to the right feet")
----------------------------------------------------------------- Insights: percentage of people are prefering to the right feet
print("The average overall of preferred Right foot", data.loc[data['preferred_foot'] == 'Right']['overall'].mean())
print("The average overall of preferred Left foot", data.loc[data['preferred_foot'] == 'Left']['overall'].mean())
The average overall of preferred Right foot 66.11174785100286 The average overall of preferred Left foot 66.67577582213988
Preferred foot doesn't have a significant impact on the overall.
data[data['preferred_foot'] == 'Left'][['short_name', 'age', 'club', 'nationality']].head(10).style.background_gradient('magma')
| short_name | age | club | nationality | |
|---|---|---|---|---|
| 0 | L. Messi | 32 | FC Barcelona | Argentina |
| 9 | M. Salah | 27 | Liverpool | Egypt |
| 16 | G. Chiellini | 34 | Juventus | Italy |
| 22 | A. Griezmann | 28 | FC Barcelona | France |
| 23 | P. Dybala | 25 | Juventus | Argentina |
| 25 | Ederson | 25 | Manchester City | Brazil |
| 28 | T. Courtois | 27 | Real Madrid | Belgium |
| 32 | H. Lloris | 32 | Tottenham Hotspur | France |
| 33 | David Silva | 33 | Manchester City | Spain |
| 40 | A. Laporte | 25 | Manchester City | France |
data[data['preferred_foot'] == 'Right'][['short_name', 'age', 'club', 'nationality']].head(10).style.background_gradient('viridis')
| short_name | age | club | nationality | |
|---|---|---|---|---|
| 1 | Cristiano Ronaldo | 34 | Juventus | Portugal |
| 2 | Neymar Jr | 27 | Paris Saint-Germain | Brazil |
| 3 | J. Oblak | 26 | Atlético Madrid | Slovenia |
| 4 | E. Hazard | 28 | Real Madrid | Belgium |
| 5 | K. De Bruyne | 28 | Manchester City | Belgium |
| 6 | M. ter Stegen | 27 | FC Barcelona | Germany |
| 7 | V. van Dijk | 27 | Liverpool | Netherlands |
| 8 | L. Modrić | 33 | Real Madrid | Croatia |
| 10 | K. Mbappé | 20 | Paris Saint-Germain | France |
| 11 | K. Koulibaly | 28 | Napoli | Senegal |
data.international_reputation.value_counts()
1 16794 2 1140 3 292 4 46 5 6 Name: international_reputation, dtype: int64
sns.countplot(data.international_reputation)
plt.show()
print('----------------------------------------')
print('Insights:')
print('92% of players international_reputation is "1" ')
---------------------------------------- Insights: 92% of players international_reputation is "1"
len(data.loc[data['international_reputation'] == 5])
6
These 6 players (L. Messi, Cristiano Ronaldo, Neymar Jr, L. Suárez, M. Neuer, Z. Ibrahimović) international reputation is 5. It means, they know to more people in world wide.
data.weak_foot.value_counts()
3 11347 2 3865 4 2666 5 245 1 155 Name: weak_foot, dtype: int64
sns.countplot(data.weak_foot)
plt.show()
print('Insights:')
print('more players weak foot at 3')
Insights: more players weak foot at 3
data[data['preferred_foot'] == 'Left'][['short_name','weak_foot', 'club', 'nationality']].head(10).style.background_gradient('magma')
| short_name | weak_foot | club | nationality | |
|---|---|---|---|---|
| 0 | L. Messi | 4 | FC Barcelona | Argentina |
| 9 | M. Salah | 3 | Liverpool | Egypt |
| 16 | G. Chiellini | 3 | Juventus | Italy |
| 22 | A. Griezmann | 3 | FC Barcelona | France |
| 23 | P. Dybala | 3 | Juventus | Argentina |
| 25 | Ederson | 3 | Manchester City | Brazil |
| 28 | T. Courtois | 2 | Real Madrid | Belgium |
| 32 | H. Lloris | 1 | Tottenham Hotspur | France |
| 33 | David Silva | 2 | Manchester City | Spain |
| 40 | A. Laporte | 3 | Manchester City | France |
data[data['preferred_foot'] == 'Right'][['short_name','weak_foot', 'club', 'nationality']].head(10).style.background_gradient('viridis')
| short_name | weak_foot | club | nationality | |
|---|---|---|---|---|
| 1 | Cristiano Ronaldo | 4 | Juventus | Portugal |
| 2 | Neymar Jr | 5 | Paris Saint-Germain | Brazil |
| 3 | J. Oblak | 3 | Atlético Madrid | Slovenia |
| 4 | E. Hazard | 4 | Real Madrid | Belgium |
| 5 | K. De Bruyne | 5 | Manchester City | Belgium |
| 6 | M. ter Stegen | 4 | FC Barcelona | Germany |
| 7 | V. van Dijk | 3 | Liverpool | Netherlands |
| 8 | L. Modrić | 4 | Real Madrid | Croatia |
| 10 | K. Mbappé | 4 | Paris Saint-Germain | France |
| 11 | K. Koulibaly | 3 | Napoli | Senegal |
sns.countplot(data.skill_moves)
plt.show()
print('Insights:')
print('more players skill_means at 2')
Insights: more players skill_means at 2
data['work_rate'].value_counts()
Medium/Medium 9875 High/Medium 3216 Medium/High 1718 High/High 986 Medium/Low 886 High/Low 684 Low/Medium 461 Low/High 417 Low/Low 35 Name: work_rate, dtype: int64
plt.figure(figsize=(14, 7))
sns.countplot(data.work_rate)
plt.show()
print('Insights:')
print(len(data.loc[data['work_rate'] == 'Medium/High']),'players have Medium/Medium work rates followed by High/Medium work rates')
Insights: 1718 players have Medium/Medium work rates followed by High/Medium work rates
len(data.loc[data['work_rate'] == 'High/High'])
986
986 players work rate is high/high
len((data.loc[data['work_rate'] == 'Low/Low']))
35
35 players work rate is low/low
Let us now create a new feature BMI from weight and height, and analyse its effect on performance ratings.
data['bmi'] = data['weight_kg'] // (data['height_cm']/100)**2
plt.figure(figsize= (14, 7))
ax = sns.countplot(x='bmi', data=data, order=data.bmi.value_counts().iloc[:20].index)
ax.set_title(label='Count of Players on Basis of BMI(Body Mass Index) in FIFA 20')
ax.set_xlabel(xlabel='BMI(Body Mass Index)')
ax.set_ylabel(ylabel='Count')
plt.show()
we can see that, 22 is the most common BMI
fig = go.Figure()
fig = go.Figure(data=go.Scatter(
x = data['bmi'],
y = data['overall'],
mode='markers',
marker=dict(
color=data['overall'],
showscale=True
),
text= data['short_name'],
))
fig.update_layout(title='BMI vs Overall Rating',
xaxis_title='BMI',
yaxis_title='Overall Rating')
fig.show()
We observe that:
Highest rating for BMI 24.
No direct relation.
Maximum of rating first increases and then decreases.
data_copy=data.copy()
data_copy.head(1)
| sofifa_id | player_url | short_name | long_name | age | dob | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | body_type | real_face | release_clause_eur | player_tags | team_position | team_jersey_number | loaned_from | joined | contract_valid_until | nation_position | nation_jersey_number | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | player_traits | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | bmi | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 158023 | https://sofifa.com/player/158023/lionel-messi/... | L. Messi | Lionel Andrés Messi Cuccittini | 32 | 1987-06-24 | 170 | 72 | Argentina | FC Barcelona | 94 | 94 | 95500000 | 565000 | RW, CF, ST | Left | 5 | 4 | 4 | Medium/Low | Messi | Yes | 195800000.0 | #Dribbler, #Distance Shooter, #Crosser, #FK Sp... | RW | 10.0 | NaN | 2004-07-01 | 2021.0 | NaN | NaN | 87.0 | 92.0 | 92.0 | 96.0 | 39.0 | 66.0 | NaN | NaN | NaN | NaN | NaN | NaN | Beat Offside Trap, Argues with Officials, Earl... | 88 | 95 | 70 | 92 | 88 | 97 | 93 | 94 | 92 | 96 | 91 | 84 | 93 | 95 | 95 | 86 | 68 | 75 | 68 | 94 | 48 | 40 | 94 | 94 | 75 | 96 | 33 | 37 | 26 | 6 | 11 | 15 | 14 | 8 | 89+2 | 89+2 | 89+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 93+2 | 92+2 | 87+2 | 87+2 | 87+2 | 92+2 | 68+2 | 66+2 | 66+2 | 66+2 | 68+2 | 63+2 | 52+2 | 52+2 | 52+2 | 63+2 | 24.0 |
columns1 = ['dribbling','defending','physic','passing','shooting','pace','ls','st','rs','lw','lf','cf','rf','rw','lam',
'cam','ram','lm','lcm','cm','rcm','rm','lwb','ldm','cdm','rdm','rwb','lb','lcb','cb','rcb','rb']
columns = ['ls', 'st', 'rs', 'lw', 'lf', 'cf', 'rf', 'rw', 'lam', 'cam', 'ram',
'lm', 'lcm', 'cm', 'rcm', 'rm', 'lwb', 'ldm', 'cdm', 'rdm', 'rwb', 'lb',
'lcb', 'cb', 'rcb', 'rb']
Let's omit the '+' sign
for col in columns:
data_copy[col]=data_copy[col].str.split('+',n=1,expand = True)[0]
data_copy[columns]
| ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 89 | 89 | 89 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 92 | 87 | 87 | 87 | 92 | 68 | 66 | 66 | 66 | 68 | 63 | 52 | 52 | 52 | 63 |
| 1 | 91 | 91 | 91 | 89 | 90 | 90 | 90 | 89 | 88 | 88 | 88 | 88 | 81 | 81 | 81 | 88 | 65 | 61 | 61 | 61 | 65 | 61 | 53 | 53 | 53 | 61 |
| 2 | 84 | 84 | 84 | 90 | 89 | 89 | 89 | 90 | 90 | 90 | 90 | 89 | 82 | 82 | 82 | 89 | 66 | 61 | 61 | 61 | 66 | 61 | 46 | 46 | 46 | 61 |
| 3 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 4 | 83 | 83 | 83 | 89 | 88 | 88 | 88 | 89 | 89 | 89 | 89 | 89 | 83 | 83 | 83 | 89 | 66 | 63 | 63 | 63 | 66 | 61 | 49 | 49 | 49 | 61 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 18273 | 32 | 32 | 32 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 33 | 33 | 33 | 33 | 33 | 43 | 42 | 42 | 42 | 43 | 45 | 46 | 46 | 46 | 45 |
| 18274 | 33 | 33 | 33 | 33 | 32 | 32 | 32 | 33 | 33 | 33 | 33 | 35 | 36 | 36 | 36 | 35 | 44 | 43 | 43 | 43 | 44 | 46 | 47 | 47 | 47 | 46 |
| 18275 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 45 | 47 | 49 | 49 | 49 | 47 | 47 | 49 | 49 | 49 | 47 |
| 18276 | 43 | 43 | 43 | 45 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 48 | 48 | 48 | 48 | 48 | 49 | 49 | 49 | 48 |
| 18277 | 42 | 42 | 42 | 44 | 43 | 43 | 43 | 44 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 49 | 49 | 49 | 48 | 48 | 50 | 50 | 50 | 48 |
18278 rows × 26 columns
Let's Replace NaN values with 0 and converting it into int
data_copy[columns] = data_copy[columns].fillna(0)
data_copy[columns] = data_copy[columns].astype(int)
median = data_copy[columns].median(skipna=True)
median
ls 57.0 st 57.0 rs 57.0 lw 59.0 lf 58.0 cf 58.0 rf 58.0 rw 59.0 lam 58.0 cam 58.0 ram 58.0 lm 59.0 lcm 57.0 cm 57.0 rcm 57.0 rm 59.0 lwb 56.0 ldm 56.0 cdm 56.0 rdm 56.0 rwb 56.0 lb 56.0 lcb 55.0 cb 55.0 rcb 55.0 rb 56.0 dtype: float64
data_copy[columns]=data_copy[columns].replace(0,data_copy[columns].median())
data_copy[columns]
| ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 89 | 89 | 89 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 92 | 87 | 87 | 87 | 92 | 68 | 66 | 66 | 66 | 68 | 63 | 52 | 52 | 52 | 63 |
| 1 | 91 | 91 | 91 | 89 | 90 | 90 | 90 | 89 | 88 | 88 | 88 | 88 | 81 | 81 | 81 | 88 | 65 | 61 | 61 | 61 | 65 | 61 | 53 | 53 | 53 | 61 |
| 2 | 84 | 84 | 84 | 90 | 89 | 89 | 89 | 90 | 90 | 90 | 90 | 89 | 82 | 82 | 82 | 89 | 66 | 61 | 61 | 61 | 66 | 61 | 46 | 46 | 46 | 61 |
| 3 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 4 | 83 | 83 | 83 | 89 | 88 | 88 | 88 | 89 | 89 | 89 | 89 | 89 | 83 | 83 | 83 | 89 | 66 | 63 | 63 | 63 | 66 | 61 | 49 | 49 | 49 | 61 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 18273 | 32 | 32 | 32 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 33 | 33 | 33 | 33 | 33 | 43 | 42 | 42 | 42 | 43 | 45 | 46 | 46 | 46 | 45 |
| 18274 | 33 | 33 | 33 | 33 | 32 | 32 | 32 | 33 | 33 | 33 | 33 | 35 | 36 | 36 | 36 | 35 | 44 | 43 | 43 | 43 | 44 | 46 | 47 | 47 | 47 | 46 |
| 18275 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 45 | 47 | 49 | 49 | 49 | 47 | 47 | 49 | 49 | 49 | 47 |
| 18276 | 43 | 43 | 43 | 45 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 48 | 48 | 48 | 48 | 48 | 49 | 49 | 49 | 48 |
| 18277 | 42 | 42 | 42 | 44 | 43 | 43 | 43 | 44 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 49 | 49 | 49 | 48 | 48 | 50 | 50 | 50 | 48 |
18278 rows × 26 columns
data_copy[columns].dtypes
ls int32 st int32 rs int32 lw int32 lf int32 cf int32 rf int32 rw int32 lam int32 cam int32 ram int32 lm int32 lcm int32 cm int32 rcm int32 rm int32 lwb int32 ldm int32 cdm int32 rdm int32 rwb int32 lb int32 lcb int32 cb int32 rcb int32 rb int32 dtype: object
columns1 = ['dribbling','defending','physic','passing','shooting','pace']
for col in columns1:
data_copy[col] = data_copy[col].fillna(data_copy[col].median())
data_copy[columns1]
| dribbling | defending | physic | passing | shooting | pace | |
|---|---|---|---|---|---|---|
| 0 | 96.0 | 39.0 | 66.0 | 92.0 | 92.0 | 87.0 |
| 1 | 89.0 | 35.0 | 78.0 | 82.0 | 93.0 | 90.0 |
| 2 | 95.0 | 32.0 | 58.0 | 87.0 | 85.0 | 91.0 |
| 3 | 64.0 | 56.0 | 66.0 | 58.0 | 54.0 | 69.0 |
| 4 | 94.0 | 35.0 | 66.0 | 86.0 | 83.0 | 91.0 |
| ... | ... | ... | ... | ... | ... | ... |
| 18273 | 33.0 | 47.0 | 51.0 | 28.0 | 23.0 | 57.0 |
| 18274 | 35.0 | 48.0 | 48.0 | 33.0 | 24.0 | 58.0 |
| 18275 | 45.0 | 48.0 | 51.0 | 44.0 | 35.0 | 54.0 |
| 18276 | 47.0 | 45.0 | 52.0 | 47.0 | 35.0 | 59.0 |
| 18277 | 45.0 | 47.0 | 55.0 | 51.0 | 32.0 | 60.0 |
18278 rows × 6 columns
data_copy[columns1]=data_copy[columns1].astype(int)
data_copy[columns1].dtypes
data_copy[columns1].dtypes
dribbling int32 defending int32 physic int32 passing int32 shooting int32 pace int32 dtype: object
columns3=['gk_diving','gk_handling','gk_kicking','gk_reflexes','gk_speed','gk_positioning']
data_copy[columns3] = data_copy[columns3].fillna(0)
data_copy[columns3]=data_copy[columns3].astype(int)
data_copy[columns3]
| gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 | 87 | 92 | 78 | 89 | 52 | 90 |
| 4 | 0 | 0 | 0 | 0 | 0 | 0 |
| ... | ... | ... | ... | ... | ... | ... |
| 18273 | 0 | 0 | 0 | 0 | 0 | 0 |
| 18274 | 0 | 0 | 0 | 0 | 0 | 0 |
| 18275 | 0 | 0 | 0 | 0 | 0 | 0 |
| 18276 | 0 | 0 | 0 | 0 | 0 | 0 |
| 18277 | 0 | 0 | 0 | 0 | 0 | 0 |
18278 rows × 6 columns
#missing values inthe team_position column
data_copy.team_position.isnull().sum()
240
data_copy['team_position'].value_counts()
SUB 7820 RES 2958 GK 662 LCB 660 RCB 660 LB 560 RB 560 ST 458 LCM 411 RCM 411 RM 399 LM 398 CAM 311 RDM 244 LDM 242 LS 195 RS 195 CDM 181 LW 162 RW 161 CB 100 CM 76 LWB 58 RWB 58 LAM 23 RAM 23 LF 19 RF 19 CF 14 Name: team_position, dtype: int64
data_copy['team_position'].fillna(data_copy['team_position'].mode()[0], inplace = True)
data_copy['team_position'].value_counts()
SUB 8060 RES 2958 GK 662 LCB 660 RCB 660 LB 560 RB 560 ST 458 LCM 411 RCM 411 RM 399 LM 398 CAM 311 RDM 244 LDM 242 LS 195 RS 195 CDM 181 LW 162 RW 161 CB 100 CM 76 LWB 58 RWB 58 LAM 23 RAM 23 LF 19 RF 19 CF 14 Name: team_position, dtype: int64
data_copy.columns
Index(['sofifa_id', 'player_url', 'short_name', 'long_name', 'age', 'dob',
'height_cm', 'weight_kg', 'nationality', 'club',
...
'ldm', 'cdm', 'rdm', 'rwb', 'lb', 'lcb', 'cb', 'rcb', 'rb', 'bmi'],
dtype='object', length=105)
droping_column=['long_name','player_url','body_type','real_face','sofifa_id','dob','player_tags',
'loaned_from','joined','nation_position','player_traits','release_clause_eur','team_jersey_number','contract_valid_until','nation_jersey_number']
data_copy = data_copy.drop(droping_column, axis = 1)
data_copy.head(2)
| short_name | age | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | team_position | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | bmi | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | L. Messi | 32 | 170 | 72 | Argentina | FC Barcelona | 94 | 94 | 95500000 | 565000 | RW, CF, ST | Left | 5 | 4 | 4 | Medium/Low | RW | 87 | 92 | 92 | 96 | 39 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 95 | 70 | 92 | 88 | 97 | 93 | 94 | 92 | 96 | 91 | 84 | 93 | 95 | 95 | 86 | 68 | 75 | 68 | 94 | 48 | 40 | 94 | 94 | 75 | 96 | 33 | 37 | 26 | 6 | 11 | 15 | 14 | 8 | 89 | 89 | 89 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 92 | 87 | 87 | 87 | 92 | 68 | 66 | 66 | 66 | 68 | 63 | 52 | 52 | 52 | 63 | 24.0 |
| 1 | Cristiano Ronaldo | 34 | 187 | 83 | Portugal | Juventus | 93 | 93 | 58500000 | 405000 | ST, LW | Right | 5 | 4 | 5 | High/Low | LW | 90 | 93 | 82 | 89 | 35 | 78 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 94 | 89 | 83 | 87 | 89 | 81 | 76 | 77 | 92 | 89 | 91 | 87 | 96 | 71 | 95 | 95 | 85 | 78 | 93 | 63 | 29 | 95 | 82 | 85 | 95 | 28 | 32 | 24 | 7 | 11 | 15 | 14 | 11 | 91 | 91 | 91 | 89 | 90 | 90 | 90 | 89 | 88 | 88 | 88 | 88 | 81 | 81 | 81 | 88 | 65 | 61 | 61 | 61 | 65 | 61 | 53 | 53 | 53 | 61 | 23.0 |
data_copy.columns
Index(['short_name', 'age', 'height_cm', 'weight_kg', 'nationality', 'club',
'overall', 'potential', 'value_eur', 'wage_eur', 'player_positions',
'preferred_foot', 'international_reputation', 'weak_foot',
'skill_moves', 'work_rate', 'team_position', 'pace', 'shooting',
'passing', 'dribbling', 'defending', 'physic', 'gk_diving',
'gk_handling', 'gk_kicking', 'gk_reflexes', 'gk_speed',
'gk_positioning', 'attacking_crossing', 'attacking_finishing',
'attacking_heading_accuracy', 'attacking_short_passing',
'attacking_volleys', 'skill_dribbling', 'skill_curve',
'skill_fk_accuracy', 'skill_long_passing', 'skill_ball_control',
'movement_acceleration', 'movement_sprint_speed', 'movement_agility',
'movement_reactions', 'movement_balance', 'power_shot_power',
'power_jumping', 'power_stamina', 'power_strength', 'power_long_shots',
'mentality_aggression', 'mentality_interceptions',
'mentality_positioning', 'mentality_vision', 'mentality_penalties',
'mentality_composure', 'defending_marking', 'defending_standing_tackle',
'defending_sliding_tackle', 'goalkeeping_diving',
'goalkeeping_handling', 'goalkeeping_kicking',
'goalkeeping_positioning', 'goalkeeping_reflexes', 'ls', 'st', 'rs',
'lw', 'lf', 'cf', 'rf', 'rw', 'lam', 'cam', 'ram', 'lm', 'lcm', 'cm',
'rcm', 'rm', 'lwb', 'ldm', 'cdm', 'rdm', 'rwb', 'lb', 'lcb', 'cb',
'rcb', 'rb', 'bmi'],
dtype='object')
data_copy.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 18278 entries, 0 to 18277 Data columns (total 90 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 short_name 18278 non-null object 1 age 18278 non-null int64 2 height_cm 18278 non-null int64 3 weight_kg 18278 non-null int64 4 nationality 18278 non-null object 5 club 18278 non-null object 6 overall 18278 non-null int64 7 potential 18278 non-null int64 8 value_eur 18278 non-null int64 9 wage_eur 18278 non-null int64 10 player_positions 18278 non-null object 11 preferred_foot 18278 non-null object 12 international_reputation 18278 non-null int64 13 weak_foot 18278 non-null int64 14 skill_moves 18278 non-null int64 15 work_rate 18278 non-null object 16 team_position 18278 non-null object 17 pace 18278 non-null int32 18 shooting 18278 non-null int32 19 passing 18278 non-null int32 20 dribbling 18278 non-null int32 21 defending 18278 non-null int32 22 physic 18278 non-null int32 23 gk_diving 18278 non-null int32 24 gk_handling 18278 non-null int32 25 gk_kicking 18278 non-null int32 26 gk_reflexes 18278 non-null int32 27 gk_speed 18278 non-null int32 28 gk_positioning 18278 non-null int32 29 attacking_crossing 18278 non-null int64 30 attacking_finishing 18278 non-null int64 31 attacking_heading_accuracy 18278 non-null int64 32 attacking_short_passing 18278 non-null int64 33 attacking_volleys 18278 non-null int64 34 skill_dribbling 18278 non-null int64 35 skill_curve 18278 non-null int64 36 skill_fk_accuracy 18278 non-null int64 37 skill_long_passing 18278 non-null int64 38 skill_ball_control 18278 non-null int64 39 movement_acceleration 18278 non-null int64 40 movement_sprint_speed 18278 non-null int64 41 movement_agility 18278 non-null int64 42 movement_reactions 18278 non-null int64 43 movement_balance 18278 non-null int64 44 power_shot_power 18278 non-null int64 45 power_jumping 18278 non-null int64 46 power_stamina 18278 non-null int64 47 power_strength 18278 non-null int64 48 power_long_shots 18278 non-null int64 49 mentality_aggression 18278 non-null int64 50 mentality_interceptions 18278 non-null int64 51 mentality_positioning 18278 non-null int64 52 mentality_vision 18278 non-null int64 53 mentality_penalties 18278 non-null int64 54 mentality_composure 18278 non-null int64 55 defending_marking 18278 non-null int64 56 defending_standing_tackle 18278 non-null int64 57 defending_sliding_tackle 18278 non-null int64 58 goalkeeping_diving 18278 non-null int64 59 goalkeeping_handling 18278 non-null int64 60 goalkeeping_kicking 18278 non-null int64 61 goalkeeping_positioning 18278 non-null int64 62 goalkeeping_reflexes 18278 non-null int64 63 ls 18278 non-null int32 64 st 18278 non-null int32 65 rs 18278 non-null int32 66 lw 18278 non-null int32 67 lf 18278 non-null int32 68 cf 18278 non-null int32 69 rf 18278 non-null int32 70 rw 18278 non-null int32 71 lam 18278 non-null int32 72 cam 18278 non-null int32 73 ram 18278 non-null int32 74 lm 18278 non-null int32 75 lcm 18278 non-null int32 76 cm 18278 non-null int32 77 rcm 18278 non-null int32 78 rm 18278 non-null int32 79 lwb 18278 non-null int32 80 ldm 18278 non-null int32 81 cdm 18278 non-null int32 82 rdm 18278 non-null int32 83 rwb 18278 non-null int32 84 lb 18278 non-null int32 85 lcb 18278 non-null int32 86 cb 18278 non-null int32 87 rcb 18278 non-null int32 88 rb 18278 non-null int32 89 bmi 18278 non-null float64 dtypes: float64(1), int32(38), int64(44), object(7) memory usage: 9.9+ MB
column_r=['short_name','age','team_position','overall','potential','pace','shooting','passing','dribbling','defending','physic']
attack=['LW','LS','LF','RS','RW','RF','ST','CF']
attack_data= data.query('team_position in @attack')
fig= px.pie(attack_data, names='team_position', color_discrete_sequence= px.colors.sequential.Inferno,
title='Percentage of Player Attacking Positions')
fig.update_traces(textposition='inside', textinfo='percent+label')
fig.show()
Attacking Positions:-
ST:- Striker LS:- Left Striker RS:- Right Striker LW:- Left Winger RW:- Right Winger RF:- Right Forward LF:- Left Forward CF:- Center Forward
attack = ['LW', 'RW', 'ST', 'LF', 'RF', 'CF', 'LS', 'RS']
attack_data = data_copy.query('team_position in @attack')
attack_data=attack_data[column_r]
attack_data=attack_data.set_index(['short_name','team_position','age'])
attack_data.head(2)
| overall | potential | pace | shooting | passing | dribbling | defending | physic | |||
|---|---|---|---|---|---|---|---|---|---|---|
| short_name | team_position | age | ||||||||
| L. Messi | RW | 32 | 94 | 94 | 87 | 92 | 92 | 96 | 39 | 66 |
| Cristiano Ronaldo | LW | 34 | 93 | 93 | 90 | 93 | 82 | 89 | 35 | 78 |
defence = ['LWB', 'RWB', 'CB', 'LB', 'RB', 'LCB', 'RCB']
defence_data = data.query('team_position in @defence')
fig = px.pie(defence_data, names='team_position',
color_discrete_sequence=px.colors.sequential.Inferno ,
title='Percentages of Player Defending Positions')
fig.update_traces(textposition='inside', textinfo='percent+label')
fig.show()
Defending Positions:-
LCB:- Left Center Back
RCB:- Right Center Back
LB:- Left Back
RB:- Right Back
CB:- Center Back
RWB:- Right Wing Back
LWB:- Left Wing Back
defence = ['LWB', 'RWB', 'CB', 'LB', 'RB', 'LCB', 'RCB']
defence_data = data_copy.query('team_position in @defence')
defence_data =defence_data[column_r]
defence_data =defence_data.set_index(['short_name','team_position','age'])
defence_data.head(2)
| overall | potential | pace | shooting | passing | dribbling | defending | physic | |||
|---|---|---|---|---|---|---|---|---|---|---|
| short_name | team_position | age | ||||||||
| V. van Dijk | LCB | 27 | 90 | 91 | 77 | 60 | 70 | 71 | 90 | 86 |
| K. Koulibaly | LCB | 28 | 89 | 91 | 71 | 28 | 54 | 67 | 89 | 87 |
mid = ['CM', 'RCM', 'LCM', 'RM', 'LM', 'CAM', 'RDM', 'LDM', 'CDM', 'RAM', 'LAM']
mid_data = data.query('team_position in @mid')
fig = px.pie(mid_data, names='team_position',
color_discrete_sequence=px.colors.sequential.Inferno ,
title='Percentages of Player Midfield Positions')
fig.update_traces(textposition='inside', textinfo='percent+label')
fig.show()
Midfield Positions:-
RCM:- Right Centra Midfielder LCM:- Left Centra Midfielder RM:- Right Midfielder LM:- Left Midfielder CAM:- Central Attacking Midfielder RDM:- Right Defensive Midfielder LDM:- Left Defensive Midfielder CDM:- Central Defensive Midfielder CM:- Central Midfielder RAM:- Right Attacking Midfielder LAM:- Left Attacking Midfielder
Midfield = ['CM', 'RCM', 'LCM', 'RM', 'LM', 'CAM', 'RDM', 'LDM', 'CDM', 'RAM', 'LAM']
mid_data = data_copy.query('team_position in @Midfield')
mid_data =mid_data[column_r]
mid_data =mid_data.set_index(['short_name','age','team_position'])
mid_data.head(2)
| overall | potential | pace | shooting | passing | dribbling | defending | physic | |||
|---|---|---|---|---|---|---|---|---|---|---|
| short_name | age | team_position | ||||||||
| Neymar Jr | 27 | CAM | 92 | 92 | 91 | 85 | 87 | 95 | 32 | 58 |
| K. De Bruyne | 28 | RCM | 91 | 91 | 76 | 86 | 92 | 86 | 61 | 78 |
Goal_column=['short_name','age','team_position','goalkeeping_diving','goalkeeping_handling','goalkeeping_kicking','goalkeeping_positioning','goalkeeping_reflexes']
Goal_keep=['GK']
Goal_keep_data = data_copy.query('team_position in @Goal_keep')
Goal_keep_data=Goal_keep_data[Goal_column]
Goal_keep_data=Goal_keep_data.set_index(['short_name','age','team_position'])
Goal_keep_data.head(2)
| goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | |||
|---|---|---|---|---|---|---|---|
| short_name | age | team_position | |||||
| J. Oblak | 26 | GK | 87 | 92 | 78 | 90 | 89 |
| M. ter Stegen | 27 | GK | 88 | 85 | 88 | 88 | 90 |
We have made a seperate dataframe for the numeric columns from data to analyse.
numeric_features=numeric_features = ['age','height_cm','weight_kg','overall','potential','value_eur',
'wage_eur','international_reputation','weak_foot',
'skill_moves','release_clause_eur']
numeric_dataset1 = data[numeric_features]
plt.figure(figsize=(15,10))
sns.heatmap(numeric_dataset1.corr(), annot=True, cbar=True)
<AxesSubplot:>
We observe that there is high correlation between the following features:-
wage and value
release clause and value
release clause and age
In such cases, We should remove one of the features of these pairs when using the data for training to get better results.
top_players = data_copy[data_copy.short_name.isin(['L. Messi', 'V. van Dijk', 'Neymar Jr'])]
top_players = top_players[['short_name','team_position','overall','potential','pace', 'shooting', 'passing', 'dribbling', 'defending', 'physic']]
top_players
| short_name | team_position | overall | potential | pace | shooting | passing | dribbling | defending | physic | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | L. Messi | RW | 94 | 94 | 87 | 92 | 92 | 96 | 39 | 66 |
| 2 | Neymar Jr | CAM | 92 | 92 | 91 | 85 | 87 | 95 | 32 | 58 |
| 7 | V. van Dijk | LCB | 90 | 91 | 77 | 60 | 70 | 71 | 90 | 86 |
# Library for building interactive charts
import plotly.graph_objects as go
# Module for creating blocks
from plotly.subplots import make_subplots
def create_polarcharts(
stats: list,
color: str,
img_link: str,
name_one: str,
name_two: str
):
'''
The function accepts the following arguments:
stats - takes a list of numeric values of characteristics
color - takes the color of the lines in the diagram
img_link - accepts a link to an image of a football player
name_one - takes the name of the footballer
name_two - accepts any additional text
'''
# Determine the number of rows and columns
fig = make_subplots(rows=1, cols=2,
# We indicate the types of graphs in each block
specs=[[{'type': 'xy'}, {"type": "polar"}]],
# Setting the width of each column
column_widths=[0.5, 0.5])
# Create a Polar Chart
fig.add_trace(go.Scatterpolar(
# Passing numeric parameters
r=stats,
# Passing parameter names
theta=['Pace', 'Shooting', 'Passing', 'Dribbling', 'Defending', 'Physic'],
# Setting the fill parameter
fill='toself',
# Specify the signature on hover
hovertemplate='<b>%{theta}</b>' + f'<b>: '+'%{r}',
# Specify a caption for the legend
name='',
# Specifying the line color
line=dict(color=color)),
# Specify line and column numbers
row=1, col=2)
# Add an image to the chart
fig.layout.images = [dict(
# Passing a link to the image
source=img_link,
# Specify the position of the image along the x-axis
x=0.2,
# Specify the position of the image along the y-axis
y=0.5,
# Setting the size of the chart
sizex=1,
sizey=1.6,
# Setting the position along the x-axis
xanchor="center",
# Setting the y-axis position
yanchor="middle",
# Place the image under the chart
layer="below"
)
]
fig.update_layout(
# Set the name of the chart
title=f'<b>{name_one}</b><br><sub>{name_two}</sub>',
# Setting the background color
paper_bgcolor="rgb(223, 223, 223)",
# Setting the chart theme
template='xgridoff',
# Passing chart parameters
polar=dict(
# Background color
bgcolor="rgb(223, 223, 223)",
# Adding a line with numeric divisions
radialaxis=dict(
# Displaying the line
visible = True,
# Set the range of divisions
range = [0, 100]
)
),
# Passing the parameters to the font
font=dict(
# Font type
family='Arials',
# Font size
size=15,
# Font color
color='Black'
)
)
# Displaying the graph
fig.show()
create_polarcharts([87, 92, 92, 96, 39, 66],
'MidnightBlue',
'https://th.bing.com/th/id/OIP.2f8gz-gDSPVyFhpb16QpJQHaLw?w=115&h=183&c=7&o=5&dpr=1.25&pid=1.7', 'L. Messi', 'Attacker')
create_polarcharts([91, 85, 87, 95, 32, 58],
'MidnightBlue',
'data:image/jpeg;base64,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',
'Neymar Jr',
'Midfielder')
#J. Oblak
create_polarcharts([77, 60, 70, 71,90, 86],
'MidnightBlue',
'https://t.resfu.com/img_data/players/big/107732.jpg',
'V. van Dijk',
'Defender')
def create_polarcharts(
stats: list,
color: str,
img_link: str,
name_one: str,
name_two: str
):
'''
The function accepts the following arguments:
stats - takes a list of numeric values of characteristics
color - takes the color of the lines in the diagram
img_link - accepts a link to an image of a football player
name_one - takes the name of the footballer
name_two - accepts any additional text
'''
# Determine the number of rows and columns
fig = make_subplots(rows=1, cols=2,
# We indicate the types of graphs in each block
specs=[[{'type': 'xy'}, {"type": "polar"}]],
# Setting the width of each column
column_widths=[0.5, 0.5])
# Create a Polar Chart
fig.add_trace(go.Scatterpolar(
# Passing numeric parameters
r=stats,
# Passing parameter names
theta=['goalkeeping_diving','goalkeeping_handling','goalkeeping_kicking','goalkeeping_positioning','goalkeeping_reflexes'],
# Setting the fill parameter
fill='toself',
# Specify the signature on hover
hovertemplate='<b>%{theta}</b>' + f'<b>: '+'%{r}',
# Specify a caption for the legend
name='',
# Specifying the line color
line=dict(color=color)),
# Specify line and column numbers
row=1, col=2)
# Add an image to the chart
fig.layout.images = [dict(
# Passing a link to the image
source=img_link,
# Specify the position of the image along the x-axis
x=0.2,
# Specify the position of the image along the y-axis
y=0.5,
# Setting the size of the chart
sizex=1,
sizey=1.6,
# Setting the position along the x-axis
xanchor="center",
# Setting the y-axis position
yanchor="middle",
# Place the image under the chart
layer="below"
)
]
fig.update_layout(
# Set the name of the chart
title=f'<b>{name_one}</b><br><sub>{name_two}</sub>',
# Setting the background color
paper_bgcolor="rgb(223, 223, 223)",
# Setting the chart theme
template='xgridoff',
# Passing chart parameters
polar=dict(
# Background color
bgcolor="rgb(223, 223, 223)",
# Adding a line with numeric divisions
radialaxis=dict(
# Displaying the line
visible = True,
# Set the range of divisions
range = [0, 100]
)
),
# Passing the parameters to the font
font=dict(
# Font type
family='Arials',
# Font size
size=14,
# Font color
color='Black'
)
)
# Displaying the graph
fig.show()
create_polarcharts([87, 92, 92, 96, 39],
'MidnightBlue',
'https://sky.shorthandstories.com/diego-simeone-atletico/assets/qcniKrZYqh/gettyimages-1282561174-1496x2042.jpeg', 'J. Oblak', 'Goalkeepers')
data_final=data_copy[['short_name','age', 'height_cm', 'weight_kg', 'nationality', 'club',
'overall', 'potential', 'value_eur', 'wage_eur', 'player_positions',
'preferred_foot', 'international_reputation', 'weak_foot',
'skill_moves', 'work_rate', 'team_position', 'pace', 'shooting',
'passing', 'dribbling', 'defending', 'physic', 'gk_diving',
'gk_handling', 'gk_kicking', 'gk_reflexes', 'gk_speed',
'gk_positioning', 'attacking_crossing', 'attacking_finishing',
'attacking_heading_accuracy', 'attacking_short_passing',
'attacking_volleys', 'skill_dribbling', 'skill_curve',
'skill_fk_accuracy', 'skill_long_passing', 'skill_ball_control',
'movement_acceleration', 'movement_sprint_speed', 'movement_agility',
'movement_reactions', 'movement_balance', 'power_shot_power',
'power_jumping', 'power_stamina', 'power_strength', 'power_long_shots',
'mentality_aggression', 'mentality_interceptions',
'mentality_positioning', 'mentality_vision', 'mentality_penalties',
'mentality_composure', 'defending_marking', 'defending_standing_tackle',
'defending_sliding_tackle', 'goalkeeping_diving',
'goalkeeping_handling', 'goalkeeping_kicking',
'goalkeeping_positioning', 'goalkeeping_reflexes', 'ls', 'st', 'rs',
'lw', 'lf', 'cf', 'rf', 'rw', 'lam', 'cam', 'ram', 'lm', 'lcm', 'cm',
'rcm', 'rm', 'lwb', 'ldm', 'cdm', 'rdm', 'rwb', 'lb', 'lcb', 'cb',
'rcb', 'rb']]
data_final
| short_name | age | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | team_position | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | L. Messi | 32 | 170 | 72 | Argentina | FC Barcelona | 94 | 94 | 95500000 | 565000 | RW, CF, ST | Left | 5 | 4 | 4 | Medium/Low | RW | 87 | 92 | 92 | 96 | 39 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 95 | 70 | 92 | 88 | 97 | 93 | 94 | 92 | 96 | 91 | 84 | 93 | 95 | 95 | 86 | 68 | 75 | 68 | 94 | 48 | 40 | 94 | 94 | 75 | 96 | 33 | 37 | 26 | 6 | 11 | 15 | 14 | 8 | 89 | 89 | 89 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 92 | 87 | 87 | 87 | 92 | 68 | 66 | 66 | 66 | 68 | 63 | 52 | 52 | 52 | 63 |
| 1 | Cristiano Ronaldo | 34 | 187 | 83 | Portugal | Juventus | 93 | 93 | 58500000 | 405000 | ST, LW | Right | 5 | 4 | 5 | High/Low | LW | 90 | 93 | 82 | 89 | 35 | 78 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 94 | 89 | 83 | 87 | 89 | 81 | 76 | 77 | 92 | 89 | 91 | 87 | 96 | 71 | 95 | 95 | 85 | 78 | 93 | 63 | 29 | 95 | 82 | 85 | 95 | 28 | 32 | 24 | 7 | 11 | 15 | 14 | 11 | 91 | 91 | 91 | 89 | 90 | 90 | 90 | 89 | 88 | 88 | 88 | 88 | 81 | 81 | 81 | 88 | 65 | 61 | 61 | 61 | 65 | 61 | 53 | 53 | 53 | 61 |
| 2 | Neymar Jr | 27 | 175 | 68 | Brazil | Paris Saint-Germain | 92 | 92 | 105500000 | 290000 | LW, CAM | Right | 5 | 5 | 5 | High/Medium | CAM | 91 | 85 | 87 | 95 | 32 | 58 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 87 | 62 | 87 | 87 | 96 | 88 | 87 | 81 | 95 | 94 | 89 | 96 | 92 | 84 | 80 | 61 | 81 | 49 | 84 | 51 | 36 | 87 | 90 | 90 | 94 | 27 | 26 | 29 | 9 | 9 | 15 | 15 | 11 | 84 | 84 | 84 | 90 | 89 | 89 | 89 | 90 | 90 | 90 | 90 | 89 | 82 | 82 | 82 | 89 | 66 | 61 | 61 | 61 | 66 | 61 | 46 | 46 | 46 | 61 |
| 3 | J. Oblak | 26 | 188 | 87 | Slovenia | Atlético Madrid | 91 | 93 | 77500000 | 125000 | GK | Right | 3 | 3 | 1 | Medium/Medium | GK | 69 | 54 | 58 | 64 | 56 | 66 | 87 | 92 | 78 | 89 | 52 | 90 | 13 | 11 | 15 | 43 | 13 | 12 | 13 | 14 | 40 | 30 | 43 | 60 | 67 | 88 | 49 | 59 | 78 | 41 | 78 | 12 | 34 | 19 | 11 | 65 | 11 | 68 | 27 | 12 | 18 | 87 | 92 | 78 | 90 | 89 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 4 | E. Hazard | 28 | 175 | 74 | Belgium | Real Madrid | 91 | 91 | 90000000 | 470000 | LW, CF | Right | 4 | 4 | 4 | High/Medium | LW | 91 | 83 | 86 | 94 | 35 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 84 | 61 | 89 | 83 | 95 | 83 | 79 | 83 | 94 | 94 | 88 | 95 | 90 | 94 | 82 | 56 | 84 | 63 | 80 | 54 | 41 | 87 | 89 | 88 | 91 | 34 | 27 | 22 | 11 | 12 | 6 | 8 | 8 | 83 | 83 | 83 | 89 | 88 | 88 | 88 | 89 | 89 | 89 | 89 | 89 | 83 | 83 | 83 | 89 | 66 | 63 | 63 | 63 | 66 | 61 | 49 | 49 | 49 | 61 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 18273 | Shao Shuai | 22 | 186 | 79 | China PR | Beijing Renhe FC | 48 | 56 | 40000 | 2000 | CB | Right | 1 | 3 | 2 | Medium/High | RES | 57 | 23 | 28 | 33 | 47 | 51 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 17 | 40 | 35 | 27 | 24 | 23 | 21 | 28 | 35 | 56 | 58 | 45 | 40 | 73 | 36 | 70 | 60 | 47 | 16 | 46 | 48 | 28 | 25 | 39 | 41 | 45 | 50 | 52 | 5 | 5 | 13 | 5 | 14 | 32 | 32 | 32 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 33 | 33 | 33 | 33 | 33 | 43 | 42 | 42 | 42 | 43 | 45 | 46 | 46 | 46 | 45 |
| 18274 | Xiao Mingjie | 22 | 177 | 66 | China PR | Shanghai SIPG FC | 48 | 56 | 40000 | 2000 | CB | Right | 1 | 2 | 2 | Medium/Medium | SUB | 58 | 24 | 33 | 35 | 48 | 48 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 20 | 42 | 43 | 28 | 32 | 24 | 29 | 39 | 31 | 55 | 61 | 43 | 41 | 76 | 33 | 72 | 55 | 44 | 20 | 42 | 49 | 23 | 25 | 37 | 35 | 42 | 53 | 57 | 13 | 6 | 14 | 11 | 9 | 33 | 33 | 33 | 33 | 32 | 32 | 32 | 33 | 33 | 33 | 33 | 35 | 36 | 36 | 36 | 35 | 44 | 43 | 43 | 43 | 44 | 46 | 47 | 47 | 47 | 46 |
| 18275 | Zhang Wei | 19 | 186 | 75 | China PR | Hebei China Fortune FC | 48 | 56 | 40000 | 1000 | CM | Right | 1 | 2 | 2 | Low/Medium | SUB | 54 | 35 | 44 | 45 | 48 | 51 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 33 | 49 | 53 | 32 | 40 | 32 | 32 | 55 | 49 | 55 | 54 | 52 | 52 | 57 | 48 | 60 | 50 | 51 | 26 | 50 | 45 | 38 | 38 | 36 | 39 | 46 | 52 | 46 | 7 | 8 | 10 | 6 | 14 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 45 | 47 | 49 | 49 | 49 | 47 | 47 | 49 | 49 | 49 | 47 |
| 18276 | Wang Haijian | 18 | 185 | 74 | China PR | Shanghai Greenland Shenhua FC | 48 | 54 | 40000 | 1000 | CM | Right | 1 | 2 | 2 | Low/Low | SUB | 59 | 35 | 47 | 47 | 45 | 52 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 34 | 47 | 54 | 28 | 42 | 37 | 39 | 48 | 49 | 55 | 63 | 55 | 54 | 59 | 46 | 61 | 42 | 55 | 28 | 57 | 49 | 31 | 48 | 36 | 40 | 39 | 44 | 54 | 14 | 9 | 13 | 13 | 13 | 43 | 43 | 43 | 45 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 48 | 48 | 48 | 48 | 48 | 49 | 49 | 49 | 48 |
| 18277 | Pan Ximing | 26 | 182 | 78 | China PR | Hebei China Fortune FC | 48 | 51 | 40000 | 2000 | CM | Right | 1 | 3 | 2 | Medium/Medium | SUB | 60 | 32 | 51 | 45 | 47 | 55 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 30 | 48 | 58 | 25 | 40 | 34 | 35 | 52 | 46 | 54 | 64 | 52 | 49 | 71 | 41 | 64 | 40 | 61 | 30 | 54 | 47 | 29 | 52 | 38 | 42 | 52 | 42 | 48 | 8 | 12 | 14 | 9 | 10 | 42 | 42 | 42 | 44 | 43 | 43 | 43 | 44 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 49 | 49 | 49 | 48 | 48 | 50 | 50 | 50 | 48 |
18278 rows × 89 columns
data_final.columns
Index(['short_name', 'age', 'height_cm', 'weight_kg', 'nationality', 'club',
'overall', 'potential', 'value_eur', 'wage_eur', 'player_positions',
'preferred_foot', 'international_reputation', 'weak_foot',
'skill_moves', 'work_rate', 'team_position', 'pace', 'shooting',
'passing', 'dribbling', 'defending', 'physic', 'gk_diving',
'gk_handling', 'gk_kicking', 'gk_reflexes', 'gk_speed',
'gk_positioning', 'attacking_crossing', 'attacking_finishing',
'attacking_heading_accuracy', 'attacking_short_passing',
'attacking_volleys', 'skill_dribbling', 'skill_curve',
'skill_fk_accuracy', 'skill_long_passing', 'skill_ball_control',
'movement_acceleration', 'movement_sprint_speed', 'movement_agility',
'movement_reactions', 'movement_balance', 'power_shot_power',
'power_jumping', 'power_stamina', 'power_strength', 'power_long_shots',
'mentality_aggression', 'mentality_interceptions',
'mentality_positioning', 'mentality_vision', 'mentality_penalties',
'mentality_composure', 'defending_marking', 'defending_standing_tackle',
'defending_sliding_tackle', 'goalkeeping_diving',
'goalkeeping_handling', 'goalkeeping_kicking',
'goalkeeping_positioning', 'goalkeeping_reflexes', 'ls', 'st', 'rs',
'lw', 'lf', 'cf', 'rf', 'rw', 'lam', 'cam', 'ram', 'lm', 'lcm', 'cm',
'rcm', 'rm', 'lwb', 'ldm', 'cdm', 'rdm', 'rwb', 'lb', 'lcb', 'cb',
'rcb', 'rb'],
dtype='object')
data_final.columns.isnull().sum()
0
data_final.describe(include='O')
| short_name | nationality | club | player_positions | preferred_foot | work_rate | team_position | |
|---|---|---|---|---|---|---|---|
| count | 18278 | 18278 | 18278 | 18278 | 18278 | 18278 | 18278 |
| unique | 17354 | 162 | 698 | 643 | 2 | 9 | 29 |
| top | J. Rodríguez | England | Southampton | CB | Right | Medium/Medium | SUB |
| freq | 11 | 1667 | 33 | 2322 | 13960 | 9875 | 8060 |
# Import label encoder
from sklearn import preprocessing
# label_encoder object knows how to understand word labels.
label_encoder = preprocessing.LabelEncoder()
data_final['nationality']= label_encoder.fit_transform(data_final['nationality'])
data_final['club']= label_encoder.fit_transform(data_final['club'])
data_final['player_positions']= label_encoder.fit_transform(data_final['player_positions'])
data_final['preferred_foot']= label_encoder.fit_transform(data_final['preferred_foot'])
data_final['work_rate']= label_encoder.fit_transform(data_final['work_rate'])
#data_final['team_position']= label_encoder.fit_transform(data_final['team_position'])
data_final
| short_name | age | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | team_position | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | L. Messi | 32 | 170 | 72 | 5 | 224 | 94 | 94 | 95500000 | 565000 | 544 | 0 | 5 | 4 | 4 | 7 | RW | 87 | 92 | 92 | 96 | 39 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 95 | 70 | 92 | 88 | 97 | 93 | 94 | 92 | 96 | 91 | 84 | 93 | 95 | 95 | 86 | 68 | 75 | 68 | 94 | 48 | 40 | 94 | 94 | 75 | 96 | 33 | 37 | 26 | 6 | 11 | 15 | 14 | 8 | 89 | 89 | 89 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 92 | 87 | 87 | 87 | 92 | 68 | 66 | 66 | 66 | 68 | 63 | 52 | 52 | 52 | 63 |
| 1 | Cristiano Ronaldo | 34 | 187 | 83 | 121 | 350 | 93 | 93 | 58500000 | 405000 | 620 | 1 | 5 | 4 | 5 | 1 | LW | 90 | 93 | 82 | 89 | 35 | 78 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 94 | 89 | 83 | 87 | 89 | 81 | 76 | 77 | 92 | 89 | 91 | 87 | 96 | 71 | 95 | 95 | 85 | 78 | 93 | 63 | 29 | 95 | 82 | 85 | 95 | 28 | 32 | 24 | 7 | 11 | 15 | 14 | 11 | 91 | 91 | 91 | 89 | 90 | 90 | 90 | 89 | 88 | 88 | 88 | 88 | 81 | 81 | 81 | 88 | 65 | 61 | 61 | 61 | 65 | 61 | 53 | 53 | 53 | 61 |
| 2 | Neymar Jr | 27 | 175 | 68 | 18 | 462 | 92 | 92 | 105500000 | 290000 | 344 | 1 | 5 | 5 | 5 | 2 | CAM | 91 | 85 | 87 | 95 | 32 | 58 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 87 | 62 | 87 | 87 | 96 | 88 | 87 | 81 | 95 | 94 | 89 | 96 | 92 | 84 | 80 | 61 | 81 | 49 | 84 | 51 | 36 | 87 | 90 | 90 | 94 | 27 | 26 | 29 | 9 | 9 | 15 | 15 | 11 | 84 | 84 | 84 | 90 | 89 | 89 | 89 | 90 | 90 | 90 | 90 | 89 | 82 | 82 | 82 | 89 | 66 | 61 | 61 | 61 | 66 | 61 | 46 | 46 | 46 | 61 |
| 3 | J. Oblak | 26 | 188 | 87 | 133 | 63 | 91 | 93 | 77500000 | 125000 | 226 | 1 | 3 | 3 | 1 | 8 | GK | 69 | 54 | 58 | 64 | 56 | 66 | 87 | 92 | 78 | 89 | 52 | 90 | 13 | 11 | 15 | 43 | 13 | 12 | 13 | 14 | 40 | 30 | 43 | 60 | 67 | 88 | 49 | 59 | 78 | 41 | 78 | 12 | 34 | 19 | 11 | 65 | 11 | 68 | 27 | 12 | 18 | 87 | 92 | 78 | 90 | 89 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 4 | E. Hazard | 28 | 175 | 74 | 12 | 505 | 91 | 91 | 90000000 | 470000 | 350 | 1 | 4 | 4 | 4 | 2 | LW | 91 | 83 | 86 | 94 | 35 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 84 | 61 | 89 | 83 | 95 | 83 | 79 | 83 | 94 | 94 | 88 | 95 | 90 | 94 | 82 | 56 | 84 | 63 | 80 | 54 | 41 | 87 | 89 | 88 | 91 | 34 | 27 | 22 | 11 | 12 | 6 | 8 | 8 | 83 | 83 | 83 | 89 | 88 | 88 | 88 | 89 | 89 | 89 | 89 | 89 | 83 | 83 | 83 | 89 | 66 | 63 | 63 | 63 | 66 | 61 | 49 | 49 | 49 | 61 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 18273 | Shao Shuai | 22 | 186 | 79 | 28 | 79 | 48 | 56 | 40000 | 2000 | 55 | 1 | 1 | 3 | 2 | 6 | RES | 57 | 23 | 28 | 33 | 47 | 51 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 17 | 40 | 35 | 27 | 24 | 23 | 21 | 28 | 35 | 56 | 58 | 45 | 40 | 73 | 36 | 70 | 60 | 47 | 16 | 46 | 48 | 28 | 25 | 39 | 41 | 45 | 50 | 52 | 5 | 5 | 13 | 5 | 14 | 32 | 32 | 32 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 31 | 33 | 33 | 33 | 33 | 33 | 43 | 42 | 42 | 42 | 43 | 45 | 46 | 46 | 46 | 45 |
| 18274 | Xiao Mingjie | 22 | 177 | 66 | 28 | 574 | 48 | 56 | 40000 | 2000 | 55 | 1 | 1 | 2 | 2 | 8 | SUB | 58 | 24 | 33 | 35 | 48 | 48 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 20 | 42 | 43 | 28 | 32 | 24 | 29 | 39 | 31 | 55 | 61 | 43 | 41 | 76 | 33 | 72 | 55 | 44 | 20 | 42 | 49 | 23 | 25 | 37 | 35 | 42 | 53 | 57 | 13 | 6 | 14 | 11 | 9 | 33 | 33 | 33 | 33 | 32 | 32 | 32 | 33 | 33 | 33 | 33 | 35 | 36 | 36 | 36 | 35 | 44 | 43 | 43 | 43 | 44 | 46 | 47 | 47 | 47 | 46 |
| 18275 | Zhang Wei | 19 | 186 | 75 | 28 | 317 | 48 | 56 | 40000 | 1000 | 155 | 1 | 1 | 2 | 2 | 5 | SUB | 54 | 35 | 44 | 45 | 48 | 51 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 33 | 49 | 53 | 32 | 40 | 32 | 32 | 55 | 49 | 55 | 54 | 52 | 52 | 57 | 48 | 60 | 50 | 51 | 26 | 50 | 45 | 38 | 38 | 36 | 39 | 46 | 52 | 46 | 7 | 8 | 10 | 6 | 14 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 43 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 45 | 47 | 49 | 49 | 49 | 47 | 47 | 49 | 49 | 49 | 47 |
| 18276 | Wang Haijian | 18 | 185 | 74 | 28 | 573 | 48 | 54 | 40000 | 1000 | 155 | 1 | 1 | 2 | 2 | 4 | SUB | 59 | 35 | 47 | 47 | 45 | 52 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 34 | 47 | 54 | 28 | 42 | 37 | 39 | 48 | 49 | 55 | 63 | 55 | 54 | 59 | 46 | 61 | 42 | 55 | 28 | 57 | 49 | 31 | 48 | 36 | 40 | 39 | 44 | 54 | 14 | 9 | 13 | 13 | 13 | 43 | 43 | 43 | 45 | 44 | 44 | 44 | 45 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 48 | 48 | 48 | 48 | 48 | 49 | 49 | 49 | 48 |
| 18277 | Pan Ximing | 26 | 182 | 78 | 28 | 317 | 48 | 51 | 40000 | 2000 | 155 | 1 | 1 | 3 | 2 | 8 | SUB | 60 | 32 | 51 | 45 | 47 | 55 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 30 | 48 | 58 | 25 | 40 | 34 | 35 | 52 | 46 | 54 | 64 | 52 | 49 | 71 | 41 | 64 | 40 | 61 | 30 | 54 | 47 | 29 | 52 | 38 | 42 | 52 | 42 | 48 | 8 | 12 | 14 | 9 | 10 | 42 | 42 | 42 | 44 | 43 | 43 | 43 | 44 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 46 | 48 | 49 | 49 | 49 | 48 | 48 | 50 | 50 | 50 | 48 |
18278 rows × 89 columns
data_final = data_final[data_final.overall >= 87] # extracting players with overall 87
data_final
names = data_final.short_name.tolist()
team_positions=data_final.team_position.tolist()
data_final = data_final.drop(['short_name','team_position'], axis = 1)
data_final
| age | height_cm | weight_kg | nationality | club | overall | potential | value_eur | wage_eur | player_positions | preferred_foot | international_reputation | weak_foot | skill_moves | work_rate | pace | shooting | passing | dribbling | defending | physic | gk_diving | gk_handling | gk_kicking | gk_reflexes | gk_speed | gk_positioning | attacking_crossing | attacking_finishing | attacking_heading_accuracy | attacking_short_passing | attacking_volleys | skill_dribbling | skill_curve | skill_fk_accuracy | skill_long_passing | skill_ball_control | movement_acceleration | movement_sprint_speed | movement_agility | movement_reactions | movement_balance | power_shot_power | power_jumping | power_stamina | power_strength | power_long_shots | mentality_aggression | mentality_interceptions | mentality_positioning | mentality_vision | mentality_penalties | mentality_composure | defending_marking | defending_standing_tackle | defending_sliding_tackle | goalkeeping_diving | goalkeeping_handling | goalkeeping_kicking | goalkeeping_positioning | goalkeeping_reflexes | ls | st | rs | lw | lf | cf | rf | rw | lam | cam | ram | lm | lcm | cm | rcm | rm | lwb | ldm | cdm | rdm | rwb | lb | lcb | cb | rcb | rb | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 32 | 170 | 72 | 5 | 224 | 94 | 94 | 95500000 | 565000 | 544 | 0 | 5 | 4 | 4 | 7 | 87 | 92 | 92 | 96 | 39 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 95 | 70 | 92 | 88 | 97 | 93 | 94 | 92 | 96 | 91 | 84 | 93 | 95 | 95 | 86 | 68 | 75 | 68 | 94 | 48 | 40 | 94 | 94 | 75 | 96 | 33 | 37 | 26 | 6 | 11 | 15 | 14 | 8 | 89 | 89 | 89 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 93 | 92 | 87 | 87 | 87 | 92 | 68 | 66 | 66 | 66 | 68 | 63 | 52 | 52 | 52 | 63 |
| 1 | 34 | 187 | 83 | 121 | 350 | 93 | 93 | 58500000 | 405000 | 620 | 1 | 5 | 4 | 5 | 1 | 90 | 93 | 82 | 89 | 35 | 78 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 94 | 89 | 83 | 87 | 89 | 81 | 76 | 77 | 92 | 89 | 91 | 87 | 96 | 71 | 95 | 95 | 85 | 78 | 93 | 63 | 29 | 95 | 82 | 85 | 95 | 28 | 32 | 24 | 7 | 11 | 15 | 14 | 11 | 91 | 91 | 91 | 89 | 90 | 90 | 90 | 89 | 88 | 88 | 88 | 88 | 81 | 81 | 81 | 88 | 65 | 61 | 61 | 61 | 65 | 61 | 53 | 53 | 53 | 61 |
| 2 | 27 | 175 | 68 | 18 | 462 | 92 | 92 | 105500000 | 290000 | 344 | 1 | 5 | 5 | 5 | 2 | 91 | 85 | 87 | 95 | 32 | 58 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 87 | 62 | 87 | 87 | 96 | 88 | 87 | 81 | 95 | 94 | 89 | 96 | 92 | 84 | 80 | 61 | 81 | 49 | 84 | 51 | 36 | 87 | 90 | 90 | 94 | 27 | 26 | 29 | 9 | 9 | 15 | 15 | 11 | 84 | 84 | 84 | 90 | 89 | 89 | 89 | 90 | 90 | 90 | 90 | 89 | 82 | 82 | 82 | 89 | 66 | 61 | 61 | 61 | 66 | 61 | 46 | 46 | 46 | 61 |
| 3 | 26 | 188 | 87 | 133 | 63 | 91 | 93 | 77500000 | 125000 | 226 | 1 | 3 | 3 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 87 | 92 | 78 | 89 | 52 | 90 | 13 | 11 | 15 | 43 | 13 | 12 | 13 | 14 | 40 | 30 | 43 | 60 | 67 | 88 | 49 | 59 | 78 | 41 | 78 | 12 | 34 | 19 | 11 | 65 | 11 | 68 | 27 | 12 | 18 | 87 | 92 | 78 | 90 | 89 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 4 | 28 | 175 | 74 | 12 | 505 | 91 | 91 | 90000000 | 470000 | 350 | 1 | 4 | 4 | 4 | 2 | 91 | 83 | 86 | 94 | 35 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 84 | 61 | 89 | 83 | 95 | 83 | 79 | 83 | 94 | 94 | 88 | 95 | 90 | 94 | 82 | 56 | 84 | 63 | 80 | 54 | 41 | 87 | 89 | 88 | 91 | 34 | 27 | 22 | 11 | 12 | 6 | 8 | 8 | 83 | 83 | 83 | 89 | 88 | 88 | 88 | 89 | 89 | 89 | 89 | 89 | 83 | 83 | 83 | 89 | 66 | 63 | 63 | 63 | 66 | 61 | 49 | 49 | 49 | 61 |
| 5 | 28 | 181 | 70 | 12 | 400 | 91 | 91 | 90000000 | 370000 | 11 | 1 | 4 | 5 | 4 | 0 | 76 | 86 | 92 | 86 | 61 | 78 | 0 | 0 | 0 | 0 | 0 | 0 | 93 | 82 | 55 | 92 | 82 | 86 | 85 | 83 | 91 | 91 | 77 | 76 | 78 | 91 | 76 | 91 | 63 | 89 | 74 | 90 | 76 | 61 | 88 | 94 | 79 | 91 | 68 | 58 | 51 | 15 | 13 | 5 | 10 | 13 | 82 | 82 | 82 | 87 | 87 | 87 | 87 | 87 | 88 | 88 | 88 | 88 | 87 | 87 | 87 | 88 | 77 | 77 | 77 | 77 | 77 | 73 | 66 | 66 | 66 | 73 |
| 6 | 27 | 187 | 85 | 57 | 224 | 90 | 93 | 67500000 | 250000 | 226 | 1 | 3 | 4 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 88 | 85 | 88 | 90 | 45 | 88 | 18 | 14 | 11 | 61 | 14 | 21 | 18 | 12 | 63 | 30 | 38 | 50 | 37 | 86 | 43 | 66 | 79 | 35 | 78 | 10 | 43 | 22 | 11 | 70 | 25 | 70 | 25 | 13 | 10 | 88 | 85 | 88 | 88 | 90 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 7 | 27 | 193 | 92 | 108 | 389 | 90 | 91 | 78000000 | 200000 | 55 | 1 | 3 | 3 | 2 | 8 | 77 | 60 | 70 | 71 | 90 | 86 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 52 | 86 | 78 | 45 | 70 | 60 | 70 | 81 | 76 | 74 | 79 | 61 | 88 | 53 | 81 | 90 | 75 | 92 | 64 | 82 | 89 | 47 | 65 | 62 | 89 | 91 | 92 | 85 | 13 | 10 | 13 | 11 | 11 | 69 | 69 | 69 | 67 | 69 | 69 | 69 | 67 | 69 | 69 | 69 | 69 | 74 | 74 | 74 | 69 | 79 | 83 | 83 | 83 | 79 | 81 | 87 | 87 | 87 | 81 |
| 8 | 33 | 172 | 66 | 34 | 505 | 90 | 90 | 45000000 | 340000 | 155 | 1 | 4 | 4 | 4 | 0 | 74 | 76 | 89 | 89 | 72 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 72 | 55 | 92 | 76 | 87 | 85 | 78 | 88 | 92 | 77 | 71 | 92 | 89 | 93 | 79 | 68 | 85 | 58 | 82 | 62 | 82 | 79 | 91 | 82 | 92 | 68 | 76 | 71 | 13 | 9 | 7 | 14 | 9 | 77 | 77 | 77 | 84 | 83 | 83 | 83 | 84 | 86 | 86 | 86 | 85 | 87 | 87 | 87 | 85 | 81 | 81 | 81 | 81 | 81 | 79 | 72 | 72 | 72 | 79 |
| 9 | 27 | 175 | 71 | 43 | 389 | 90 | 90 | 80500000 | 240000 | 574 | 0 | 3 | 3 | 4 | 2 | 93 | 86 | 81 | 89 | 45 | 74 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 90 | 59 | 84 | 79 | 89 | 83 | 69 | 75 | 89 | 94 | 92 | 91 | 92 | 88 | 80 | 69 | 85 | 73 | 84 | 63 | 55 | 92 | 84 | 77 | 91 | 38 | 43 | 41 | 14 | 14 | 9 | 11 | 14 | 84 | 84 | 84 | 88 | 88 | 88 | 88 | 88 | 87 | 87 | 87 | 87 | 81 | 81 | 81 | 87 | 70 | 67 | 67 | 67 | 70 | 66 | 57 | 57 | 57 | 66 |
| 10 | 20 | 178 | 73 | 53 | 462 | 89 | 95 | 93500000 | 155000 | 634 | 1 | 3 | 4 | 5 | 1 | 96 | 84 | 78 | 90 | 39 | 75 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 89 | 77 | 82 | 79 | 91 | 79 | 63 | 70 | 90 | 96 | 96 | 92 | 89 | 83 | 83 | 76 | 84 | 76 | 79 | 62 | 38 | 89 | 80 | 70 | 84 | 34 | 34 | 32 | 13 | 5 | 7 | 11 | 6 | 86 | 86 | 86 | 87 | 87 | 87 | 87 | 87 | 86 | 86 | 86 | 86 | 78 | 78 | 78 | 86 | 66 | 62 | 62 | 62 | 66 | 63 | 54 | 54 | 54 | 63 |
| 11 | 28 | 187 | 89 | 129 | 425 | 89 | 91 | 67500000 | 150000 | 55 | 1 | 3 | 3 | 2 | 6 | 71 | 28 | 54 | 67 | 89 | 87 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 22 | 83 | 71 | 14 | 69 | 28 | 28 | 63 | 71 | 69 | 73 | 52 | 86 | 41 | 55 | 81 | 73 | 95 | 15 | 87 | 88 | 35 | 52 | 33 | 82 | 91 | 90 | 87 | 7 | 11 | 7 | 13 | 5 | 56 | 56 | 56 | 55 | 57 | 57 | 57 | 55 | 58 | 58 | 58 | 60 | 65 | 65 | 65 | 60 | 74 | 79 | 79 | 79 | 74 | 77 | 86 | 86 | 86 | 77 |
| 12 | 25 | 188 | 89 | 45 | 626 | 89 | 91 | 83000000 | 220000 | 595 | 1 | 3 | 4 | 3 | 0 | 70 | 91 | 79 | 81 | 47 | 83 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 94 | 86 | 81 | 85 | 80 | 78 | 68 | 83 | 84 | 68 | 72 | 71 | 91 | 73 | 90 | 79 | 87 | 84 | 86 | 78 | 35 | 93 | 81 | 90 | 91 | 56 | 36 | 38 | 8 | 10 | 11 | 14 | 11 | 86 | 86 | 86 | 82 | 84 | 84 | 84 | 82 | 83 | 83 | 83 | 82 | 79 | 79 | 79 | 82 | 65 | 66 | 66 | 66 | 65 | 62 | 60 | 60 | 60 | 62 |
| 13 | 26 | 191 | 91 | 18 | 389 | 89 | 91 | 58000000 | 155000 | 226 | 1 | 3 | 3 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 85 | 84 | 85 | 89 | 51 | 90 | 17 | 13 | 19 | 45 | 20 | 27 | 19 | 18 | 44 | 30 | 56 | 47 | 40 | 88 | 37 | 64 | 52 | 32 | 78 | 14 | 27 | 11 | 13 | 66 | 23 | 65 | 15 | 19 | 16 | 85 | 84 | 85 | 90 | 89 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 14 | 28 | 192 | 82 | 136 | 401 | 89 | 90 | 56000000 | 205000 | 226 | 1 | 4 | 3 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 90 | 84 | 81 | 92 | 58 | 85 | 17 | 13 | 21 | 50 | 13 | 18 | 21 | 19 | 47 | 38 | 57 | 58 | 63 | 87 | 43 | 61 | 67 | 43 | 60 | 12 | 38 | 30 | 12 | 65 | 29 | 68 | 25 | 21 | 13 | 90 | 84 | 81 | 85 | 92 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 15 | 28 | 168 | 72 | 53 | 141 | 89 | 90 | 66000000 | 235000 | 96 | 1 | 3 | 3 | 2 | 6 | 78 | 65 | 77 | 81 | 87 | 83 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 65 | 54 | 86 | 56 | 79 | 49 | 49 | 81 | 80 | 79 | 77 | 82 | 93 | 92 | 71 | 77 | 97 | 73 | 63 | 90 | 92 | 72 | 79 | 54 | 85 | 90 | 91 | 85 | 15 | 12 | 10 | 7 | 10 | 72 | 72 | 72 | 77 | 76 | 76 | 76 | 77 | 78 | 78 | 78 | 79 | 82 | 82 | 82 | 79 | 85 | 87 | 87 | 87 | 85 | 84 | 83 | 83 | 83 | 84 |
| 16 | 34 | 187 | 85 | 77 | 350 | 89 | 89 | 24500000 | 215000 | 55 | 0 | 4 | 3 | 2 | 6 | 68 | 46 | 58 | 60 | 90 | 82 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 33 | 83 | 65 | 45 | 59 | 60 | 31 | 65 | 61 | 61 | 73 | 57 | 82 | 57 | 78 | 89 | 59 | 89 | 49 | 91 | 88 | 28 | 50 | 50 | 84 | 94 | 91 | 89 | 3 | 3 | 2 | 4 | 3 | 58 | 58 | 58 | 55 | 56 | 56 | 56 | 55 | 56 | 56 | 56 | 57 | 62 | 62 | 62 | 57 | 73 | 77 | 77 | 77 | 73 | 76 | 86 | 86 | 86 | 76 |
| 17 | 31 | 173 | 70 | 5 | 400 | 89 | 89 | 60000000 | 300000 | 595 | 1 | 4 | 4 | 4 | 2 | 80 | 90 | 77 | 88 | 33 | 74 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 93 | 78 | 83 | 85 | 88 | 83 | 73 | 64 | 89 | 82 | 78 | 84 | 92 | 91 | 89 | 81 | 79 | 74 | 84 | 65 | 24 | 93 | 83 | 83 | 90 | 30 | 29 | 24 | 13 | 15 | 6 | 11 | 14 | 87 | 87 | 87 | 85 | 87 | 87 | 87 | 85 | 85 | 85 | 85 | 83 | 77 | 77 | 77 | 83 | 60 | 58 | 58 | 58 | 60 | 56 | 50 | 50 | 50 | 56 |
| 18 | 33 | 184 | 82 | 136 | 505 | 89 | 89 | 31500000 | 300000 | 55 | 1 | 4 | 3 | 3 | 2 | 72 | 68 | 75 | 73 | 87 | 85 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 63 | 92 | 80 | 69 | 65 | 74 | 72 | 83 | 83 | 74 | 71 | 78 | 87 | 66 | 79 | 93 | 80 | 85 | 62 | 90 | 88 | 67 | 71 | 86 | 84 | 85 | 87 | 90 | 11 | 8 | 9 | 7 | 11 | 74 | 74 | 74 | 72 | 73 | 73 | 73 | 72 | 74 | 74 | 74 | 73 | 78 | 78 | 78 | 73 | 80 | 84 | 84 | 84 | 80 | 82 | 87 | 87 | 87 | 82 |
| 19 | 32 | 182 | 86 | 155 | 224 | 89 | 89 | 53000000 | 355000 | 595 | 1 | 5 | 4 | 3 | 2 | 73 | 89 | 80 | 84 | 51 | 84 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 91 | 83 | 82 | 90 | 85 | 86 | 82 | 72 | 84 | 76 | 70 | 79 | 92 | 79 | 88 | 69 | 82 | 86 | 86 | 87 | 41 | 92 | 82 | 83 | 85 | 57 | 45 | 38 | 27 | 25 | 31 | 33 | 37 | 86 | 86 | 86 | 83 | 85 | 85 | 85 | 83 | 84 | 84 | 84 | 82 | 79 | 79 | 79 | 82 | 67 | 67 | 67 | 67 | 67 | 64 | 63 | 63 | 63 | 64 |
| 20 | 30 | 184 | 80 | 120 | 226 | 89 | 89 | 64500000 | 235000 | 595 | 1 | 4 | 4 | 4 | 2 | 77 | 87 | 74 | 85 | 41 | 82 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 88 | 85 | 82 | 88 | 85 | 77 | 85 | 65 | 88 | 77 | 77 | 78 | 90 | 82 | 87 | 84 | 78 | 84 | 84 | 81 | 39 | 91 | 77 | 86 | 86 | 34 | 42 | 19 | 15 | 6 | 12 | 8 | 10 | 86 | 86 | 86 | 82 | 85 | 85 | 85 | 82 | 83 | 83 | 83 | 80 | 77 | 77 | 77 | 80 | 61 | 62 | 62 | 62 | 61 | 58 | 57 | 57 | 57 | 58 |
| 21 | 30 | 189 | 76 | 136 | 224 | 89 | 89 | 55000000 | 300000 | 96 | 1 | 4 | 3 | 3 | 8 | 42 | 62 | 80 | 80 | 85 | 80 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 67 | 68 | 89 | 44 | 80 | 66 | 68 | 82 | 88 | 40 | 43 | 67 | 87 | 49 | 61 | 66 | 86 | 77 | 54 | 85 | 89 | 77 | 86 | 60 | 93 | 90 | 86 | 80 | 5 | 8 | 13 | 9 | 13 | 70 | 70 | 70 | 73 | 75 | 75 | 75 | 73 | 78 | 78 | 78 | 75 | 83 | 83 | 83 | 75 | 78 | 86 | 86 | 86 | 78 | 78 | 82 | 82 | 82 | 78 |
| 22 | 28 | 176 | 73 | 53 | 224 | 89 | 89 | 69000000 | 370000 | 153 | 0 | 4 | 3 | 4 | 0 | 81 | 86 | 84 | 89 | 57 | 72 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 89 | 84 | 85 | 87 | 88 | 86 | 85 | 82 | 90 | 82 | 81 | 90 | 92 | 83 | 82 | 89 | 87 | 63 | 83 | 73 | 49 | 90 | 86 | 86 | 89 | 59 | 54 | 49 | 14 | 8 | 14 | 13 | 14 | 85 | 85 | 85 | 87 | 87 | 87 | 87 | 87 | 87 | 87 | 87 | 86 | 83 | 83 | 83 | 86 | 73 | 71 | 71 | 71 | 73 | 70 | 65 | 65 | 65 | 70 |
| 23 | 25 | 177 | 75 | 5 | 350 | 88 | 92 | 76500000 | 215000 | 41 | 0 | 3 | 3 | 4 | 8 | 83 | 82 | 84 | 90 | 43 | 64 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 80 | 64 | 87 | 88 | 90 | 88 | 88 | 75 | 93 | 86 | 81 | 91 | 84 | 85 | 80 | 75 | 79 | 61 | 86 | 48 | 42 | 80 | 87 | 86 | 84 | 32 | 48 | 40 | 5 | 4 | 4 | 5 | 8 | 80 | 80 | 80 | 85 | 85 | 85 | 85 | 85 | 86 | 86 | 86 | 85 | 80 | 80 | 80 | 85 | 68 | 64 | 64 | 64 | 68 | 64 | 54 | 54 | 54 | 64 |
| 24 | 26 | 191 | 84 | 53 | 401 | 88 | 91 | 72500000 | 250000 | 170 | 1 | 4 | 4 | 5 | 2 | 74 | 81 | 86 | 85 | 66 | 86 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 75 | 75 | 86 | 84 | 87 | 85 | 82 | 90 | 90 | 67 | 79 | 75 | 82 | 66 | 90 | 82 | 87 | 89 | 82 | 78 | 64 | 83 | 88 | 83 | 87 | 63 | 67 | 65 | 5 | 6 | 2 | 4 | 3 | 81 | 81 | 81 | 82 | 83 | 83 | 83 | 82 | 84 | 84 | 84 | 83 | 84 | 84 | 84 | 83 | 76 | 77 | 77 | 77 | 76 | 74 | 72 | 72 | 72 | 74 |
| 25 | 25 | 188 | 86 | 18 | 400 | 88 | 91 | 54500000 | 185000 | 226 | 0 | 2 | 3 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 86 | 82 | 93 | 88 | 63 | 86 | 20 | 14 | 14 | 56 | 18 | 23 | 15 | 20 | 58 | 40 | 64 | 63 | 60 | 87 | 48 | 70 | 66 | 41 | 68 | 18 | 38 | 27 | 20 | 70 | 17 | 70 | 29 | 15 | 8 | 86 | 82 | 93 | 86 | 88 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 26 | 24 | 170 | 69 | 45 | 400 | 88 | 90 | 73000000 | 255000 | 554 | 1 | 3 | 3 | 4 | 2 | 93 | 79 | 78 | 89 | 45 | 57 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 83 | 38 | 84 | 67 | 89 | 75 | 63 | 69 | 88 | 96 | 91 | 94 | 89 | 94 | 76 | 57 | 79 | 54 | 77 | 38 | 30 | 91 | 79 | 69 | 79 | 47 | 53 | 47 | 15 | 12 | 12 | 15 | 9 | 79 | 79 | 79 | 86 | 85 | 85 | 85 | 86 | 85 | 85 | 85 | 85 | 78 | 78 | 78 | 85 | 68 | 62 | 62 | 62 | 68 | 64 | 51 | 51 | 51 | 64 |
| 27 | 27 | 181 | 76 | 40 | 626 | 88 | 89 | 68000000 | 205000 | 11 | 1 | 3 | 5 | 4 | 0 | 73 | 81 | 90 | 84 | 53 | 63 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 77 | 52 | 91 | 80 | 81 | 89 | 86 | 89 | 91 | 75 | 71 | 79 | 88 | 80 | 84 | 50 | 93 | 57 | 89 | 46 | 56 | 85 | 92 | 67 | 88 | 59 | 57 | 22 | 9 | 14 | 7 | 7 | 6 | 78 | 78 | 78 | 84 | 84 | 84 | 84 | 84 | 86 | 86 | 86 | 85 | 85 | 85 | 85 | 85 | 71 | 71 | 71 | 71 | 71 | 66 | 57 | 57 | 57 | 66 |
| 28 | 27 | 199 | 96 | 12 | 505 | 88 | 89 | 48000000 | 235000 | 226 | 0 | 4 | 2 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 85 | 89 | 72 | 87 | 49 | 85 | 14 | 14 | 13 | 33 | 12 | 13 | 19 | 20 | 35 | 23 | 46 | 52 | 61 | 83 | 45 | 54 | 68 | 38 | 70 | 17 | 23 | 15 | 13 | 44 | 27 | 66 | 20 | 18 | 16 | 85 | 89 | 72 | 85 | 87 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 29 | 32 | 194 | 85 | 136 | 224 | 88 | 88 | 38000000 | 285000 | 55 | 1 | 4 | 3 | 2 | 2 | 56 | 61 | 72 | 68 | 88 | 80 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 65 | 85 | 83 | 57 | 63 | 58 | 43 | 81 | 82 | 48 | 63 | 57 | 85 | 36 | 62 | 75 | 70 | 87 | 51 | 76 | 89 | 64 | 72 | 69 | 87 | 89 | 88 | 87 | 10 | 11 | 14 | 15 | 8 | 70 | 70 | 70 | 67 | 69 | 69 | 69 | 67 | 71 | 71 | 71 | 69 | 76 | 76 | 76 | 69 | 77 | 83 | 83 | 83 | 77 | 78 | 85 | 85 | 85 | 78 |
| 30 | 34 | 193 | 92 | 133 | 341 | 88 | 88 | 26000000 | 110000 | 226 | 1 | 3 | 2 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 88 | 85 | 69 | 89 | 53 | 89 | 12 | 10 | 10 | 36 | 12 | 12 | 12 | 14 | 34 | 16 | 51 | 55 | 47 | 83 | 36 | 52 | 78 | 41 | 71 | 19 | 25 | 22 | 12 | 41 | 23 | 69 | 25 | 10 | 13 | 88 | 85 | 69 | 89 | 89 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 31 | 33 | 193 | 92 | 57 | 226 | 88 | 88 | 32000000 | 155000 | 226 | 1 | 5 | 4 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 87 | 87 | 91 | 87 | 57 | 85 | 15 | 13 | 25 | 55 | 11 | 30 | 14 | 11 | 59 | 46 | 54 | 60 | 51 | 84 | 35 | 68 | 77 | 43 | 80 | 16 | 29 | 30 | 12 | 70 | 47 | 70 | 17 | 10 | 11 | 87 | 87 | 91 | 85 | 87 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 32 | 32 | 188 | 82 | 53 | 626 | 88 | 88 | 36000000 | 150000 | 226 | 0 | 4 | 1 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 89 | 82 | 68 | 91 | 63 | 84 | 13 | 10 | 10 | 50 | 11 | 10 | 11 | 10 | 50 | 34 | 65 | 62 | 55 | 86 | 54 | 51 | 74 | 41 | 43 | 14 | 31 | 27 | 10 | 30 | 40 | 65 | 29 | 10 | 18 | 89 | 82 | 68 | 84 | 91 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 33 | 33 | 173 | 67 | 136 | 400 | 88 | 88 | 36000000 | 265000 | 11 | 0 | 4 | 2 | 4 | 2 | 65 | 74 | 88 | 89 | 52 | 57 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 72 | 54 | 92 | 82 | 87 | 82 | 77 | 84 | 92 | 69 | 61 | 87 | 89 | 88 | 72 | 64 | 73 | 48 | 73 | 57 | 50 | 88 | 91 | 75 | 92 | 59 | 53 | 29 | 6 | 15 | 7 | 6 | 12 | 76 | 76 | 76 | 83 | 83 | 83 | 83 | 83 | 85 | 85 | 85 | 83 | 83 | 83 | 83 | 83 | 68 | 69 | 69 | 69 | 68 | 63 | 56 | 56 | 56 | 63 |
| 34 | 32 | 185 | 77 | 155 | 462 | 88 | 88 | 47000000 | 195000 | 595 | 1 | 4 | 4 | 3 | 0 | 75 | 86 | 72 | 79 | 55 | 83 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 88 | 89 | 78 | 90 | 79 | 77 | 76 | 52 | 81 | 74 | 76 | 74 | 91 | 59 | 88 | 88 | 91 | 79 | 79 | 84 | 54 | 93 | 77 | 85 | 80 | 57 | 48 | 39 | 12 | 5 | 13 | 13 | 10 | 85 | 85 | 85 | 80 | 83 | 83 | 83 | 80 | 80 | 80 | 80 | 79 | 75 | 75 | 75 | 79 | 68 | 66 | 66 | 66 | 68 | 66 | 65 | 65 | 65 | 66 |
| 35 | 33 | 187 | 78 | 155 | 341 | 88 | 88 | 28000000 | 135000 | 55 | 1 | 3 | 3 | 2 | 6 | 60 | 48 | 64 | 61 | 89 | 83 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 42 | 88 | 79 | 47 | 53 | 49 | 49 | 70 | 74 | 61 | 60 | 57 | 81 | 53 | 67 | 90 | 65 | 89 | 43 | 88 | 87 | 48 | 52 | 50 | 82 | 90 | 89 | 87 | 6 | 8 | 15 | 5 | 15 | 62 | 62 | 62 | 59 | 60 | 60 | 60 | 59 | 61 | 61 | 61 | 61 | 67 | 67 | 67 | 61 | 74 | 80 | 80 | 80 | 74 | 77 | 86 | 86 | 86 | 77 |
| 36 | 29 | 183 | 76 | 57 | 505 | 88 | 88 | 57000000 | 330000 | 155 | 1 | 4 | 5 | 3 | 8 | 45 | 80 | 90 | 81 | 70 | 69 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 75 | 58 | 91 | 82 | 80 | 86 | 84 | 92 | 89 | 50 | 41 | 60 | 87 | 71 | 87 | 30 | 74 | 73 | 86 | 60 | 76 | 75 | 89 | 73 | 88 | 72 | 70 | 62 | 10 | 11 | 13 | 7 | 10 | 75 | 75 | 75 | 78 | 79 | 79 | 79 | 78 | 81 | 81 | 81 | 79 | 85 | 85 | 85 | 79 | 75 | 79 | 79 | 79 | 75 | 72 | 69 | 69 | 69 | 72 |
| 37 | 30 | 180 | 71 | 57 | 92 | 88 | 88 | 56000000 | 170000 | 26 | 1 | 4 | 4 | 4 | 2 | 85 | 88 | 84 | 87 | 45 | 66 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 87 | 49 | 86 | 90 | 87 | 89 | 86 | 77 | 88 | 85 | 85 | 86 | 87 | 84 | 88 | 71 | 76 | 67 | 87 | 51 | 48 | 89 | 86 | 90 | 85 | 49 | 37 | 45 | 12 | 12 | 13 | 13 | 11 | 82 | 82 | 82 | 86 | 86 | 86 | 86 | 86 | 86 | 86 | 86 | 85 | 80 | 80 | 80 | 85 | 69 | 65 | 65 | 65 | 69 | 64 | 55 | 55 | 55 | 64 |
| 38 | 30 | 187 | 80 | 54 | 52 | 88 | 88 | 57000000 | 205000 | 614 | 1 | 3 | 4 | 4 | 7 | 94 | 85 | 75 | 80 | 37 | 69 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 89 | 78 | 77 | 86 | 79 | 80 | 74 | 64 | 82 | 93 | 95 | 76 | 87 | 69 | 82 | 79 | 78 | 74 | 79 | 43 | 48 | 90 | 77 | 76 | 85 | 27 | 25 | 36 | 6 | 9 | 15 | 9 | 9 | 84 | 84 | 84 | 83 | 83 | 83 | 83 | 83 | 81 | 81 | 81 | 81 | 74 | 74 | 74 | 81 | 64 | 58 | 58 | 58 | 64 | 61 | 51 | 51 | 51 | 61 |
| 39 | 27 | 175 | 69 | 129 | 389 | 88 | 88 | 62000000 | 220000 | 360 | 1 | 3 | 4 | 4 | 2 | 94 | 83 | 77 | 89 | 44 | 74 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 87 | 81 | 81 | 75 | 89 | 76 | 64 | 71 | 87 | 95 | 93 | 92 | 90 | 86 | 84 | 86 | 85 | 67 | 77 | 75 | 35 | 90 | 83 | 71 | 84 | 42 | 42 | 38 | 10 | 10 | 15 | 7 | 14 | 85 | 85 | 85 | 86 | 87 | 87 | 87 | 86 | 85 | 85 | 85 | 85 | 78 | 78 | 78 | 85 | 67 | 63 | 63 | 63 | 67 | 64 | 57 | 57 | 57 | 64 |
| 40 | 25 | 189 | 85 | 53 | 400 | 87 | 90 | 56500000 | 195000 | 67 | 0 | 2 | 3 | 2 | 8 | 64 | 50 | 71 | 68 | 88 | 82 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 45 | 86 | 81 | 40 | 63 | 61 | 69 | 80 | 77 | 61 | 66 | 59 | 87 | 60 | 68 | 78 | 78 | 85 | 47 | 79 | 87 | 54 | 65 | 44 | 85 | 88 | 89 | 88 | 10 | 11 | 5 | 14 | 5 | 65 | 65 | 65 | 64 | 66 | 66 | 66 | 64 | 67 | 67 | 67 | 67 | 74 | 74 | 74 | 67 | 78 | 82 | 82 | 82 | 78 | 80 | 85 | 85 | 85 | 80 |
| 41 | 24 | 173 | 64 | 121 | 400 | 87 | 90 | 64000000 | 210000 | 538 | 0 | 2 | 3 | 4 | 0 | 81 | 76 | 83 | 92 | 51 | 67 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 78 | 51 | 86 | 69 | 92 | 84 | 67 | 74 | 92 | 85 | 78 | 94 | 85 | 92 | 74 | 51 | 93 | 54 | 75 | 69 | 49 | 85 | 85 | 68 | 87 | 49 | 59 | 40 | 9 | 10 | 14 | 12 | 9 | 77 | 77 | 77 | 85 | 84 | 84 | 84 | 85 | 85 | 85 | 85 | 86 | 82 | 82 | 82 | 86 | 72 | 69 | 69 | 69 | 72 | 67 | 57 | 57 | 57 | 67 |
| 42 | 27 | 185 | 84 | 18 | 505 | 87 | 89 | 53500000 | 240000 | 86 | 1 | 3 | 3 | 2 | 6 | 62 | 72 | 75 | 72 | 85 | 89 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 64 | 76 | 83 | 61 | 69 | 63 | 74 | 82 | 78 | 58 | 66 | 62 | 86 | 66 | 86 | 87 | 88 | 90 | 81 | 89 | 86 | 69 | 77 | 66 | 84 | 84 | 87 | 86 | 13 | 14 | 16 | 12 | 12 | 74 | 74 | 74 | 71 | 74 | 74 | 74 | 71 | 74 | 74 | 74 | 72 | 79 | 79 | 79 | 72 | 78 | 84 | 84 | 84 | 78 | 79 | 84 | 84 | 84 | 79 |
| 43 | 26 | 183 | 78 | 85 | 626 | 87 | 88 | 60000000 | 185000 | 132 | 1 | 3 | 5 | 4 | 0 | 88 | 86 | 80 | 87 | 42 | 68 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 86 | 65 | 83 | 81 | 88 | 85 | 70 | 70 | 87 | 86 | 89 | 86 | 89 | 76 | 88 | 63 | 87 | 62 | 90 | 60 | 39 | 88 | 81 | 71 | 87 | 48 | 34 | 33 | 11 | 13 | 13 | 6 | 10 | 83 | 83 | 83 | 86 | 86 | 86 | 86 | 86 | 85 | 85 | 85 | 85 | 78 | 78 | 78 | 85 | 67 | 63 | 63 | 63 | 67 | 63 | 53 | 53 | 53 | 63 |
| 44 | 34 | 179 | 67 | 18 | 400 | 87 | 87 | 19500000 | 200000 | 86 | 1 | 3 | 4 | 3 | 6 | 66 | 74 | 79 | 78 | 84 | 79 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 69 | 66 | 86 | 74 | 77 | 70 | 72 | 83 | 82 | 68 | 64 | 69 | 89 | 77 | 83 | 78 | 79 | 76 | 78 | 87 | 89 | 70 | 78 | 61 | 81 | 87 | 86 | 80 | 12 | 11 | 5 | 13 | 7 | 74 | 74 | 74 | 75 | 76 | 76 | 76 | 75 | 78 | 78 | 78 | 76 | 81 | 81 | 81 | 76 | 80 | 84 | 84 | 84 | 80 | 80 | 82 | 82 | 82 | 80 |
| 45 | 34 | 183 | 82 | 18 | 462 | 87 | 87 | 18500000 | 135000 | 55 | 1 | 4 | 3 | 2 | 6 | 62 | 54 | 72 | 72 | 87 | 78 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 40 | 81 | 80 | 61 | 67 | 62 | 61 | 80 | 80 | 60 | 64 | 67 | 82 | 67 | 71 | 90 | 71 | 81 | 65 | 76 | 90 | 59 | 70 | 60 | 86 | 88 | 88 | 85 | 9 | 12 | 5 | 9 | 10 | 66 | 66 | 66 | 66 | 67 | 67 | 67 | 66 | 69 | 69 | 69 | 68 | 75 | 75 | 75 | 68 | 77 | 82 | 82 | 82 | 77 | 78 | 84 | 84 | 84 | 78 |
| 46 | 31 | 185 | 81 | 53 | 505 | 87 | 87 | 45000000 | 285000 | 149 | 1 | 4 | 4 | 4 | 7 | 76 | 82 | 80 | 86 | 39 | 77 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 84 | 83 | 85 | 83 | 86 | 81 | 73 | 72 | 90 | 78 | 74 | 78 | 85 | 69 | 82 | 77 | 79 | 80 | 76 | 65 | 39 | 88 | 86 | 82 | 87 | 47 | 24 | 18 | 13 | 11 | 5 | 5 | 7 | 83 | 83 | 83 | 83 | 84 | 84 | 84 | 83 | 84 | 84 | 84 | 82 | 78 | 78 | 78 | 82 | 62 | 62 | 62 | 62 | 62 | 58 | 54 | 54 | 54 | 58 |
| 47 | 32 | 189 | 86 | 12 | 626 | 87 | 87 | 32500000 | 155000 | 55 | 0 | 3 | 3 | 3 | 0 | 63 | 63 | 74 | 72 | 87 | 79 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 56 | 80 | 79 | 52 | 71 | 66 | 70 | 74 | 77 | 60 | 65 | 60 | 85 | 60 | 80 | 85 | 75 | 79 | 66 | 84 | 89 | 56 | 68 | 66 | 84 | 89 | 87 | 88 | 6 | 10 | 9 | 12 | 7 | 69 | 69 | 69 | 68 | 69 | 69 | 69 | 68 | 70 | 70 | 70 | 70 | 74 | 74 | 74 | 70 | 79 | 82 | 82 | 82 | 79 | 80 | 84 | 84 | 84 | 80 |
| 48 | 32 | 169 | 61 | 12 | 425 | 87 | 87 | 40000000 | 135000 | 149 | 1 | 3 | 4 | 4 | 1 | 88 | 83 | 80 | 91 | 35 | 53 | 0 | 0 | 0 | 0 | 0 | 0 | 79 | 86 | 40 | 82 | 70 | 91 | 82 | 79 | 74 | 89 | 93 | 83 | 94 | 88 | 92 | 80 | 59 | 73 | 39 | 81 | 59 | 36 | 87 | 83 | 79 | 81 | 25 | 40 | 40 | 7 | 10 | 8 | 10 | 4 | 78 | 78 | 78 | 86 | 85 | 85 | 85 | 86 | 85 | 85 | 85 | 85 | 78 | 78 | 78 | 85 | 65 | 60 | 60 | 60 | 65 | 60 | 46 | 46 | 46 | 60 |
| 49 | 30 | 191 | 94 | 57 | 92 | 87 | 87 | 41000000 | 130000 | 55 | 1 | 4 | 3 | 3 | 2 | 51 | 58 | 76 | 72 | 89 | 76 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 55 | 87 | 81 | 60 | 68 | 65 | 53 | 85 | 81 | 46 | 55 | 64 | 87 | 59 | 71 | 68 | 65 | 85 | 51 | 71 | 89 | 56 | 79 | 68 | 89 | 90 | 89 | 86 | 15 | 6 | 10 | 5 | 6 | 68 | 68 | 68 | 67 | 68 | 68 | 68 | 67 | 71 | 71 | 71 | 69 | 77 | 77 | 77 | 69 | 77 | 83 | 83 | 83 | 77 | 78 | 84 | 84 | 84 | 78 |
| 50 | 30 | 186 | 81 | 12 | 626 | 87 | 87 | 41000000 | 155000 | 55 | 1 | 3 | 3 | 2 | 8 | 64 | 55 | 72 | 66 | 88 | 79 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 45 | 82 | 79 | 38 | 62 | 63 | 69 | 85 | 75 | 61 | 66 | 59 | 87 | 50 | 78 | 84 | 78 | 79 | 58 | 81 | 88 | 54 | 62 | 58 | 86 | 90 | 90 | 86 | 16 | 6 | 14 | 16 | 14 | 66 | 66 | 66 | 64 | 66 | 66 | 66 | 64 | 67 | 67 | 67 | 67 | 74 | 74 | 74 | 67 | 78 | 83 | 83 | 83 | 78 | 80 | 84 | 84 | 84 | 80 |
| 51 | 30 | 170 | 68 | 136 | 224 | 87 | 87 | 40000000 | 240000 | 227 | 0 | 3 | 3 | 3 | 2 | 90 | 69 | 81 | 83 | 79 | 73 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 73 | 70 | 84 | 60 | 81 | 80 | 63 | 79 | 85 | 91 | 90 | 89 | 85 | 85 | 64 | 81 | 92 | 61 | 66 | 77 | 83 | 83 | 78 | 59 | 82 | 74 | 83 | 84 | 13 | 15 | 13 | 6 | 13 | 76 | 76 | 76 | 82 | 80 | 80 | 80 | 82 | 81 | 81 | 81 | 83 | 81 | 81 | 81 | 83 | 84 | 81 | 81 | 81 | 84 | 84 | 78 | 78 | 78 | 84 |
| 52 | 28 | 174 | 70 | 136 | 226 | 87 | 87 | 50000000 | 180000 | 157 | 1 | 3 | 3 | 5 | 8 | 69 | 74 | 85 | 90 | 69 | 63 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 69 | 54 | 90 | 86 | 90 | 85 | 77 | 87 | 91 | 76 | 64 | 91 | 86 | 88 | 76 | 76 | 75 | 59 | 79 | 56 | 83 | 79 | 86 | 75 | 87 | 67 | 67 | 71 | 6 | 11 | 7 | 9 | 13 | 75 | 75 | 75 | 82 | 81 | 81 | 81 | 82 | 84 | 84 | 84 | 82 | 84 | 84 | 84 | 82 | 78 | 78 | 78 | 78 | 78 | 75 | 69 | 69 | 69 | 75 |
| 53 | 32 | 185 | 80 | 33 | 505 | 87 | 87 | 30500000 | 195000 | 226 | 1 | 3 | 3 | 1 | 8 | 69 | 54 | 58 | 64 | 56 | 66 | 90 | 81 | 75 | 90 | 53 | 82 | 11 | 15 | 11 | 30 | 11 | 16 | 11 | 15 | 37 | 19 | 54 | 53 | 60 | 84 | 61 | 56 | 74 | 39 | 75 | 13 | 32 | 20 | 16 | 68 | 25 | 67 | 28 | 14 | 14 | 90 | 81 | 75 | 82 | 90 | 57 | 57 | 57 | 59 | 58 | 58 | 58 | 59 | 58 | 58 | 58 | 59 | 57 | 57 | 57 | 59 | 56 | 56 | 56 | 56 | 56 | 56 | 55 | 55 | 55 | 56 |
| 54 | 28 | 163 | 59 | 77 | 425 | 87 | 87 | 52000000 | 140000 | 139 | 1 | 3 | 4 | 4 | 2 | 89 | 79 | 85 | 91 | 35 | 47 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 77 | 59 | 87 | 74 | 90 | 87 | 77 | 78 | 93 | 94 | 85 | 94 | 84 | 93 | 79 | 52 | 72 | 40 | 85 | 34 | 26 | 85 | 89 | 68 | 83 | 49 | 24 | 22 | 8 | 4 | 14 | 9 | 10 | 79 | 79 | 79 | 87 | 86 | 86 | 86 | 87 | 87 | 87 | 87 | 86 | 79 | 79 | 79 | 86 | 63 | 58 | 58 | 58 | 63 | 58 | 44 | 44 | 44 | 58 |
from sklearn import preprocessing
# import module
from sklearn.preprocessing import StandardScaler
x = data_final.values # numpy array
scaler = StandardScaler()
x_scaled = scaler.fit_transform(x)
X_norm = pd.DataFrame(x_scaled)
from sklearn.decomposition import PCA
pca = PCA(n_components = 2) # 2D PCA for the plot
X_ = pd.DataFrame(pca.fit_transform(X_norm))
X_ .columns = ['x', 'y']
X_
| x | y | |
|---|---|---|
| 0 | -7.941322 | -5.268978 |
| 1 | -6.240008 | -4.514799 |
| 2 | -6.613192 | -6.118575 |
| 3 | 13.210379 | -3.710364 |
| 4 | -6.211079 | -5.065423 |
| 5 | -6.673138 | -0.034588 |
| 6 | 12.769798 | -3.361838 |
| 7 | 0.492448 | 6.602990 |
| 8 | -5.933785 | 1.731451 |
| 9 | -5.494400 | -3.054408 |
| 10 | -5.035945 | -4.338662 |
| 11 | 5.590876 | 7.657040 |
| 12 | -4.032691 | -1.709355 |
| 13 | 13.294981 | -3.701327 |
| 14 | 12.654167 | -3.487976 |
| 15 | -2.889708 | 5.174976 |
| 16 | 4.899882 | 7.639632 |
| 17 | -4.557110 | -4.915256 |
| 18 | -1.865040 | 6.298640 |
| 19 | -3.992588 | -1.500011 |
| 20 | -3.703487 | -2.837978 |
| 21 | -1.283103 | 6.092856 |
| 22 | -5.969818 | -0.905028 |
| 23 | -4.404356 | -2.886814 |
| 24 | -4.921390 | 2.128812 |
| 25 | 12.426179 | -3.652362 |
| 26 | -3.960186 | -4.331479 |
| 27 | -4.968119 | -1.541618 |
| 28 | 13.837686 | -3.250089 |
| 29 | 0.914014 | 6.844958 |
| 30 | 14.239122 | -2.656339 |
| 31 | 12.697395 | -3.014220 |
| 32 | 13.378240 | -3.181999 |
| 33 | -3.939597 | -1.375695 |
| 34 | -3.069954 | -0.405504 |
| 35 | 3.921501 | 7.811080 |
| 36 | -3.382784 | 2.260060 |
| 37 | -4.790843 | -2.630740 |
| 38 | -2.855089 | -3.746151 |
| 39 | -4.710209 | -2.931791 |
| 40 | 1.654499 | 6.950502 |
| 41 | -4.586942 | -1.934865 |
| 42 | -1.140819 | 6.053115 |
| 43 | -4.499649 | -3.201746 |
| 44 | -2.529125 | 5.252475 |
| 45 | 1.007402 | 6.813163 |
| 46 | -3.318703 | -2.438586 |
| 47 | 0.159826 | 6.569679 |
| 48 | -4.173170 | -4.624249 |
| 49 | 0.521369 | 6.682640 |
| 50 | 1.411233 | 7.024332 |
| 51 | -3.946315 | 3.605950 |
| 52 | -4.238518 | 1.821699 |
| 53 | 13.242395 | -3.190847 |
| 54 | -4.451209 | -5.496386 |
#elbow method
from sklearn.cluster import KMeans
wcss=[]
for i in range (1,11):
kmeans=KMeans(n_clusters=i,init='k-means++',max_iter=300,n_init=10,random_state=42)
kmeans.fit(X_)
wcss.append(kmeans.inertia_)
plt.plot(range(1,11),wcss,marker="1")
plt.title('The Elbow Method')
plt.xlabel('Number of clusters')
plt.ylabel('WCSS')
plt.show()
kmeans = KMeans(n_clusters = 3, random_state = 42)
y_kmeans = kmeans.fit_predict(X_)
print(y_kmeans)
[0 0 0 2 0 0 2 1 0 0 0 1 0 2 2 1 1 0 1 0 0 1 0 0 0 2 0 0 2 1 2 2 2 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 0 1 1 1 0 2 0]
test=kmeans.predict(np.asarray([[4.383253,-0.978393]]))
test[0]
1
label=kmeans.labels_
label
array([0, 0, 0, 2, 0, 0, 2, 1, 0, 0, 0, 1, 0, 2, 2, 1, 1, 0, 1, 0, 0, 1,
0, 0, 0, 2, 0, 0, 2, 1, 2, 2, 2, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0,
1, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0])
from sklearn.metrics import silhouette_score
score=silhouette_score(X_,label)
score
0.7143321481575283
# centroid values
centroid = kmeans.cluster_centers_
# cluster values
clusters = kmeans.labels_.tolist()
X_['cluster'] = clusters
X_['name'] = names
X_['team_position']= team_positions
X_.head()
| x | y | cluster | name | team_position | |
|---|---|---|---|---|---|
| 0 | -7.941322 | -5.268978 | 0 | L. Messi | RW |
| 1 | -6.240008 | -4.514799 | 0 | Cristiano Ronaldo | LW |
| 2 | -6.613192 | -6.118575 | 0 | Neymar Jr | CAM |
| 3 | 13.210379 | -3.710364 | 2 | J. Oblak | GK |
| 4 | -6.211079 | -5.065423 | 0 | E. Hazard | LW |
#attack = ['LW', 'RW', 'ST', 'LF', 'RF', 'CF', 'LS', 'RS']
#defence = ['LWB', 'RWB', 'CB', 'LB', 'RB', 'LCB', 'RCB']
#Midfield = ['CM', 'RCM', 'LCM', 'RM', 'LM', 'CAM', 'RDM', 'LDM', 'CDM', 'RAM', 'LAM']
X_[y_kmeans==0]
| x | y | cluster | name | team_position | |
|---|---|---|---|---|---|
| 0 | -7.941322 | -5.268978 | 0 | L. Messi | RW |
| 1 | -6.240008 | -4.514799 | 0 | Cristiano Ronaldo | LW |
| 2 | -6.613192 | -6.118575 | 0 | Neymar Jr | CAM |
| 4 | -6.211079 | -5.065423 | 0 | E. Hazard | LW |
| 5 | -6.673138 | -0.034588 | 0 | K. De Bruyne | RCM |
| 8 | -5.933785 | 1.731451 | 0 | L. Modrić | RCM |
| 9 | -5.494400 | -3.054408 | 0 | M. Salah | RW |
| 10 | -5.035945 | -4.338662 | 0 | K. Mbappé | RW |
| 12 | -4.032691 | -1.709355 | 0 | H. Kane | ST |
| 17 | -4.557110 | -4.915256 | 0 | S. Agüero | ST |
| 19 | -3.992588 | -1.500011 | 0 | L. Suárez | ST |
| 20 | -3.703487 | -2.837978 | 0 | R. Lewandowski | ST |
| 22 | -5.969818 | -0.905028 | 0 | A. Griezmann | LW |
| 23 | -4.404356 | -2.886814 | 0 | P. Dybala | RW |
| 24 | -4.921390 | 2.128812 | 0 | P. Pogba | LDM |
| 26 | -3.960186 | -4.331479 | 0 | R. Sterling | LW |
| 27 | -4.968119 | -1.541618 | 0 | C. Eriksen | RM |
| 33 | -3.939597 | -1.375695 | 0 | David Silva | LCM |
| 34 | -3.069954 | -0.405504 | 0 | E. Cavani | ST |
| 36 | -3.382784 | 2.260060 | 0 | T. Kroos | LCM |
| 37 | -4.790843 | -2.630740 | 0 | M. Reus | CAM |
| 38 | -2.855089 | -3.746151 | 0 | P. Aubameyang | LM |
| 39 | -4.710209 | -2.931791 | 0 | S. Mané | LW |
| 41 | -4.586942 | -1.934865 | 0 | Bernardo Silva | RW |
| 43 | -4.499649 | -3.201746 | 0 | H. Son | LM |
| 46 | -3.318703 | -2.438586 | 0 | K. Benzema | CF |
| 48 | -4.173170 | -4.624249 | 0 | D. Mertens | SUB |
| 52 | -4.238518 | 1.821699 | 0 | Thiago | CDM |
| 54 | -4.451209 | -5.496386 | 0 | L. Insigne | LS |
In the first cluster we have attcakers and Midfielders
X_[y_kmeans==1]
| x | y | cluster | name | team_position | |
|---|---|---|---|---|---|
| 7 | 0.492448 | 6.602990 | 1 | V. van Dijk | LCB |
| 11 | 5.590876 | 7.657040 | 1 | K. Koulibaly | LCB |
| 15 | -2.889708 | 5.174976 | 1 | N. Kanté | RCM |
| 16 | 4.899882 | 7.639632 | 1 | G. Chiellini | LCB |
| 18 | -1.865040 | 6.298640 | 1 | Sergio Ramos | LCB |
| 21 | -1.283103 | 6.092856 | 1 | Sergio Busquets | CDM |
| 29 | 0.914014 | 6.844958 | 1 | Piqué | RCB |
| 35 | 3.921501 | 7.811080 | 1 | D. Godín | RCB |
| 40 | 1.654499 | 6.950502 | 1 | A. Laporte | LCB |
| 42 | -1.140819 | 6.053115 | 1 | Casemiro | CDM |
| 44 | -2.529125 | 5.252475 | 1 | Fernandinho | CDM |
| 45 | 1.007402 | 6.813163 | 1 | Thiago Silva | LCB |
| 47 | 0.159826 | 6.569679 | 1 | J. Vertonghen | LCB |
| 49 | 0.521369 | 6.682640 | 1 | M. Hummels | LCB |
| 50 | 1.411233 | 7.024332 | 1 | T. Alderweireld | RCB |
| 51 | -3.946315 | 3.605950 | 1 | Jordi Alba | LB |
In the second cluster we have Goal keepers
X_[y_kmeans==2]
| x | y | cluster | name | team_position | |
|---|---|---|---|---|---|
| 3 | 13.210379 | -3.710364 | 2 | J. Oblak | GK |
| 6 | 12.769798 | -3.361838 | 2 | M. ter Stegen | GK |
| 13 | 13.294981 | -3.701327 | 2 | Alisson | GK |
| 14 | 12.654167 | -3.487976 | 2 | De Gea | GK |
| 25 | 12.426179 | -3.652362 | 2 | Ederson | GK |
| 28 | 13.837686 | -3.250089 | 2 | T. Courtois | GK |
| 30 | 14.239122 | -2.656339 | 2 | S. Handanovič | GK |
| 31 | 12.697395 | -3.014220 | 2 | M. Neuer | GK |
| 32 | 13.378240 | -3.181999 | 2 | H. Lloris | GK |
| 53 | 13.242395 | -3.190847 | 2 | K. Navas | SUB |
In the third cluster we have Defenders and Midfielders
# Visualising the clusters
plt.figure(figsize=(10,5))
plt.scatter(X_[y_kmeans == 0]['x'], X_[y_kmeans == 0]['y'],marker='*',
s = 100, c = 'red', label = 'attcakers and Midfielders')
plt.scatter(X_[y_kmeans == 1]['x'], X_[y_kmeans == 1]['y'],marker='$...$',
s = 600, c = 'blue', label = 'goal keepers')
plt.scatter(X_[y_kmeans == 2]['x'], X_[y_kmeans == 2]['y'],marker="1",
s = 200, c = 'tomato', label = 'Defender and Midfielders')
plt.scatter(kmeans.cluster_centers_[:, 0], kmeans.cluster_centers_[:, 1], s = 250,
c = 'yellow',label = 'Centroids')
plt.title('Clusters of Players',fontsize=20)
plt.xlabel('X')
plt.ylabel('Y')
plt.legend()
plt.show()
In this project, we will be looking at the player data provided by FIFA which contains information such as personal details, wages, physical attributes, technical skills, potential and their positional strengths. This is primarily data of FIFA 20. Through this project, we got a glimpse of insights behind the beautiful game and the kind of information and decisions a football manager goes through.
By using FIFA 20 datadset, intially we analysed the players traits and their differents skills through the visualisation and after ploted ploar charts on the basis of different player positions and their unique skills. Finally, we applied a Dimensionality- reuction method called Principal Component analysis(PCA) for reducing columns into 2 dimensions for the fitting of k-means clustering algorithm and after we given k values as 3 for 3 clusters. Through the above k-means clustering, we get silhouette_score is 0.71, it mean that we clustered very well.
